Loop for elements

Hi everyone,

I have a Dynamo script that generates reinforcement for beams. The inputs are reinforcement properties and element selection.

How can I get this script to run for all structural framing elements in a Revit model?

I tried selecting all elements of category and didn’t work. I think I need a loop over the whole script.

Thank you in advance

Hi @ahmed.emad ! Welcome to the Dynamo community !
I think you can solve your issue by using right lacing option and right list level without the need of any loop.
Maybe you will need some filtering too, not easy to say without watching a little more of your graph :slight_smile:
Can you explain more about which part of the graph didn’t work ?

Hi @Francois_Labonne

Thanks for your concern :slight_smile:

The script is based on getting boundary curves and dimensions of a structural framing element, then translate some of theses curves and use the translated curves to get rebar. For instance, this is the script for bottom and top rebar. Please, note that the script contains custom nodes modified by me.

The problem is the script gets curves and dimensions for only one structural framing element, if I select all structural framing elements in the model.

Your problem is almost certainly in your list managment. Which is impossible to help with without seeing the script run on a list of inputs, with the white preview bubbles expanded.

Make a small test file, select all the relevant test elements and run the script, show where it breaks.

1 Like

Also, you’d need to share out those custom nodes if they are one of the failure points.

1 Like