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 exact Level Information but i need the variable one.
Thanks @Kulkul: i checked this, but now this will add all 100 Levels (ok only 2 if i filter the unique ones) into my string. is there a way to get a varibale into my string?
the other question is, that i want to add a running number to my key. i checked the Enumeration of th dynablaster package, but the same Problem is here. How should i deal with this Problems? i want to add the running number as well into my key (0001, 0002, 0003 etc.).
@Kulkul , thanks it works for the list. Do complete my solution i have to solve two more things. I Need to add the generated Level Information and the generated counting number to my string.concat to push this individual key to each instance in my model. how can i do this?
how can i flatten the Level list , i just want the number of the Level withour “Level”. the second strange Thing is, that my Dynamo crushes down, if i will do another copy in the *.dyn to add my key for another categorie, such as “walls” with the same code…
Ok, i think Dynamo crushes, because at the momment i try to put different values into the same Parameter. Maybe i have to select the geoemtry in the first step global, that means alect all geoemtry in active view maybe and filter the different categories after that?
You can flatten a list by either using the List.Flatten node or the the other List.Flatten node which flattens by a certain amount. This is a well covered topic in the forum, so do search first as the we have deviated slightly from the original question.
However, make sure the list of Elements and the list of parameter values is in the same list structure or you will get undesirable results.
I searched the net for some more neebie informations for the list.faltten node. i tried to do this, but i am not able to filter just the Level Information out of it. I tried to solit this list, but there is a blank in the middle and it didnt work as well.
[[quote=“Daniel_Woodcock1, post:11, topic:8911”]
However, make sure the list of Elements and the list of parameter values is in the same list structure or you will get undesirable results
[/quote] @Daniel_Woodcock1
I tried to take care about your advice concerning the lists. But i cant see the Problem actually in this script. Dynamo crushes down if i fill out the parameerName in the “Element.SetParameterByName” Nodein the wall Group. I collect to Groups of elements, walls and columns, so it should be no Problem to fill out the same Parameter “Kennzeichen” in the ID Goup Parameter Group.
i also tried to collect the´geometry with a python script to filter the different categories out of it, but it crushed also.