Define nested family by "matching" with the parameter "Door To"

Hello people,
I’m working on a routine where you want to:

  1. Select all door families in my project (done)

  2. Get the information “door to” (clockwork) = Room Name (done)

  3. Get all the signalling families nested in the doors
    Obs. These families are always Generic models of subcategory “visual communication”, and their names always use ID.G + Number (defined by customer standard) + Name of the room
    (currently struggling)



    Next Problems:

  4. Select the names of these signalling families and perhaps through a List Desconstruct to take only one last part of their name = Name of the Room

  5. “Match” the names of the environments and the “partial” name displayed on the signs

Easiest part:
6. Set “Element.SetParameterByName” or a similar parameter “ID.G” as the value of the elements that “match”


If anyone can help me I’ll be very grateful … I still don’t use Python, so if it is necessary I’ll have to give up on the routine :pensive:

1 Like

CONTROLE PLAQUINHAS DE PORTA.dyn (40.3 KB)

Attached the files, perhaps more clarifying

VZ-PORTA-FERRO SIMPLES.rfa (1.8 MB)

You are trying to split an element with string.split (it requires a string). You can use string.object or Element.Name (recomended).

You will also need to filter your list of nested families so you can set its parameter (I think that is what you are trying to do). Right now you have your doors plugged into Element.SetParameterByName (This will set a parameter for your doors). You can filter your list with String.Contains and List.FilterByBoolMask (This will remove all of your AC families). I can see one of your doors has two ID.G families so you will need to solve that as well.

Thank you so much for the answer @Steven! I followed your suggestions and now I’m almost done with the routine, I just need to find a way to remove the last characters from the names of very long rooms, because we never end up having space in the view to insert them without abbreviations.MATCH PLAQUINHAS.dyn (110.9 KB)

Not super sure what you mean. Can you post a screen cap?

This is a method fro removing items from the end of a string.

Hello @Steven, So I tried something like this in this file that I sent (and the image below) but I would like Dynamo to “read” only the first letters of each word (say, read the first 4). For example, in Hello World this would become “Hell Worl” But in “Hope this Help” it would remain the same “Hope this Help” (after all, each word in “Hope this Help” has 4 letters)

Ah!

Try this

1 Like

Awesome :slight_smile: Thanks a lot @Steven !