Combine all Room Names into a new shared parameter?

Hi All,

For Equipment Schedule, I’ve got a problem where for each equipment in various rooms, I need to list out all of the room names and write them into a new shared parameter called LOCATIONS.

These images below are what i’d like to achieve automatically with Dynamo:

Is that possible? Thanks

Shkattii

@shkattii This should do it. :slight_smile:

1 Like

@shkattii
See also this:

Great! Thank you for leading me to the right direction @john_pierson :slight_smile:

  1. There’s a issue when there are multiple types of equipments, the LOCATION reports all of the rooms for every equipment… How can I break it up to show LOCATION per type?

  2. The next step I would love to achieve is to filter by Type Mark. Say equipment with Type Mark begining/containing “EQ” will be filtered in and reports their LOCATION? Is this possible?

Hi @shkattii this should work for you to set your Location parameter to the rooms of each type, I added a bit where you query the elements’ family type, then group the room names by family type using GroupByKey before joining. Also to demonstrate for your second question, I added in a filtering by Type Mark at the beginning of the graph using the GetParmeterValueByNameTypeOrInstance node from the package Rhythm, and List.FilterByBoolMask

Hope this helps :slight_smile: I recommend reading and doing the exercises in the Dynamo Primer if you haven’t already!: http://dynamoprimer.com/en/

1 Like

Hi @awilliams, Thank you your sketch worked like magic :star_struck:

  1. If the LOCATION shared parameter was a type parameter instead of an instance parameter, Element.SetParameterByName gives me an error (Warning: Element.SetParameterByName operation failed.
    No parameter found by that name.) :thinking:

  2. Filtering by Type Mark worked like a dream, however can I start the sketch with all Categories (because sometimes equipments are Generic Models, Plumbing, Specialty Eq…)?

Thanks for sharing, I’ll check out the Primer :grinning:

Replace the Element.SetParameterValueByName node with the Element.SetParameterValueByNameTypeOrInstance node from the package Rhythm, it will work to set a type parameter value.

You wouldn’t really want to collect all categories in the model at once because that would make your graph run more slowly. A simple method would be to use List.Create to make a list of categories you know you want to collect, and plug that into the “All Elements of Category” node at the start of your graph:

You will likely run into an issue with this workflow, however, because the FamilyInstance.Room node will not work with families that are not room aware, and Generic Models are not room aware unless they have a room calculation point. You could use Dynamo beforehand to add Room Calculation Points into your Generic Model families if they don’t have them already; here is a post that has an uploaded .dyn file towards the end that will help you to do this: http://dynamobim.org/forums/topic/modify-room-calculation-point-toggle-builtin-parameter/ If you end up having trouble with the room calculation points, make a separate post because it would be a different issue than this post here :slight_smile:

1 Like

@awilliams YOU ARE AMAZING! :clap::clap::clap:

I’ve noticed when LOCATION parameter is instance, duplicated in-place casework families with the same Type Mark can have different LOCATION value, how can I change the sketch in order to ensure elements with identical Type Mark will report their combined LOCATION? Thank you

I’m not at a computer with Dynamo right now to test/provide you with a graphical explanation, but I think you could put a GroupByKey node after your List.FilterByBoolMask node like this:

Sorry for the crude markup :rofl: Let me know if that works. You might end up having to do some List@Level adjustments in the later part of the graph because of this change, you can read more about here List@Levels here: http://dynamobim.org/introducing-listlevel-working-with-lists-made-easier/ and also here in the Dynamo primer: http://dynamoprimer.com/en/06_Designing-with-Lists/6-3_lists-of-lists.html
Be sure to view what your outputs are by either a Watch node or hovering over the bottom right of your nodes and hitting the “pin” the node outputs, to be able to see what the list Levels are :slight_smile:

Hi @awilliams,

Thanks for the Sketch! I gave that a try, now List.GroupByKey is saying One or more input types not matching… I tried putting an ListUniqueItems infront of it but no avail. What could be issue? :thinking:


The error you are getting is because of the list structures - I said in my last reply that this would probably become an issue with the addition of the List.GroupByKey that is grouping the elements by Type Mark; it should work if you change the Levels on the List.GroupByKey that is giving you the error (note the @L2 on the List.GroupByKey in the first image attached below)

However I see now that grouping by Family Type is no longer necessary since the elements are already grouped by Type Mark. Here is a graphical explanation to demonstrate what will happen with a duplicated model-in-place family that you are using the same Type Mark for; grouping by Family Type afterward will add additional list structure to the element grouping that is not necessary for what you are trying to achieve:

This graph should work, to apply the same location parameter value for elements of the same Type Mark:

Let me know if this works and if I can explain the above better :slight_smile: be sure to study the differences between this graph and the previous ones