Hi,
sorry if the title doesn’t exactly correspond to the following problem, I had to fill it out somehow.
Imagine the following scenario:
First of all I define in revit two identity data parameters for architechtural walls called : “Wallgroup” and “ParameterX”
In Revit I have three wall goups as following:
Now I would like to set the ParameterX of all the walls in wall group 0 to 100, to set the ParameterX of all the walls in wall group 1 to 101 and to set the ParameterX of all the walls in wall group 2 to 102.
Fetching all elements by “Select Model Elements” and sorting them I achieve this by the following Dynamo Code:
So far so good.
Please note that I always want the ParameterX of all walls in group 0 to be 101, those of all walls in group 1 to be 102 and those of all walls in group 2 to be 103. The point here is that all of the walls in group 2 e. g. do always have to have their ParameterX to be 103, no matter if the list of e. g. wall group 1 is empty or not.
But deleting all of the walls in the group 1, I get the following problem:
The number of the items in the list {101,102,103}; doesn’t correspond to the number of available wall groups anymore. What I think would be the solution is to insert something e. g. in the group list of the wall in the group 1 as a place holder, even if walls of group 1 is empty.
But I don’t have any idea how to do it. I would be very grateful for any help.