Matching list structures

Hi there,
I have a list of windows in revit and list of height parameters that i wish to set to each window in the list. Both lists have the same structure.
For every window in the list, i am trying to set the height parameter at the same index in the parameter list using the custom node “Element.SetParameterByName”
for some reason that does work as if the windows and the heights don’t match.
What is the right list structure to choose in the custom node?
I share a schreenshot of the issue with the hope getting some help from the community.

Hi @ezahrouni and welcome, not sure about the custom node family instance by host and point, but I guess it is a family creation node;
If so, I think you need to use a pass through node to give Revit and Dynamo time to sort their things together before feeding the families new tasks.

Try with List.Combine if you want to match both(or mutiple) sublists.

Thank you for the response .
you gessed it right. it is a family creation node.
basically the output of that node is a list of instances of a window family, ordered in sub-lists according the wall they are on.
then i proceeded to change the heigt parameters of the just placed window instances.

what do you mean exactly by a pass through node, can you give me an example.

@ezahrouni passthrough node by clockwork package, there are many on the forum, you can search for it, am not in front of my computer right now, but basically you hook the creation node output to the waitfor input, and feed the height values to the passthrough input, then the passthrough output to the values input of setparameter node. (search the forum, better explanation than mine :slight_smile: )

1 Like

A couple of comments:

  1. Once you have your lists sorted out, you might ask yourself if the list can be flattend. I sometimes have list structures which carry-through the script beyond what they were intended for. Flattening does wonders and most of the time you don’t need to work with the Level settings on the nodes. Maybe this could help here?

  2. I would say this one is important. You are modifying parameters on the same elements at the same time. I typically modify one parameter at a time, and then pass the element on to the next parameter. (String the Set.Parameter Nodes together with the Element Out → Element In.) This may be causing issues.

1 Like

thanks for your response! I thought the same thing afterwards and and did exactely the two steps that you recommended. It helped and the problem was solved.