Hi, I try to do set parameters for the structural columns automatically depend the level. For example I want to do like this :
Parameter Name : Columns Id
–if column which is the Level 1 for example that gone like Columns Id: C101
–if column which is the Level 2 for example that gone like Columns Id: C201
I try to solve this problem with dynamo. I can add parameters to all column but not depend the levels.
I can do level 1 Columns Id: C101
Level 2 Columns Id: C108
Can you help me ?
Yna_Db
October 13, 2017, 10:59am
2
Please send a screenshot of your graph (use Dropbox or similar if you are not allowed to attach files at the moment)
Yna_Db
October 13, 2017, 12:12pm
5
You could take a look at Element.FilterByLevel (Chynamo package) for instance. If you double-click on it, you will see how it is build. See also here:
Hi all,
i have a question concerning the filtering of lists.
Goal: Add the different Level Information of families into a indivudal code which i created with the string.Concat
There are geometry in revit in 2 Levels: 0 and 1. I need a variable Information of the Level of each Family to extract the. In the future the script should work further, if someone add new Levels till 100 for example.
How can i get the variable Information of the Levels of the column for example? i am able to get the e…
I think, the answer is depend on the python script. Your post didn’t solve the my problem.
Yna_Db
October 13, 2017, 12:43pm
7
Please illustrate what you say with a screenshot.
See this optionally:
Strange. Works fine on my end. Have you tried closing the file and re-running it?
[image]
Try this:
List.GroupByKey, where the list are all the columns and the key is their level. This will produce a list of lists of columns by their level.
Then a list.SortByKey where the list is the groups of columns and the keys are the keys output from the group by key node.
You can then set a list of prefixes using the keys output and a sequence node.
Next join the prefix with the suffix (the 01 part).
Lastly Element.SetParameterValueByName with some levels and lacing set to longest will finish this off.
You may want to look into sorting them or otherwise picking a suffix logically.
1 Like
Can you explain with dynamo pictures please ?
Yna_Db
October 13, 2017, 1:16pm
10
This is precisely what you should do. Please show what you tried instead.
Unfortunately I have to work.
what about then ? I am sorry I dont understand. I am rookie with dynamo.
@asistolia23 Like @jacob.small said, Group your list of columns with their level as the key. So you need to get the Level of the elements, and connect the list of the element’s levels to the keys input on the List.GroupByKey node. You can get the elements’ level with the Element.GetParameterValueByName node.
You have to feed in a key as well as a list… see the dictionary for specifics on how to use the group by key node:
http://dictionary.dynamobim.com/#/Core/List/Action/GroupByKey
In your case you need to get some parameter values - the level - from the elements to create the keys.
Sort by key works similarly but the keys will be the unique keys from the group by node and the list will be the groups from the group by node.