Simulate Array Function in Dynamo

Hi there. I’m trying to simulate the linear Array function in Dynamo, since I want to create a group of rebars and if I want the manualy extend or shorten the length of those rebars, I would just have to modify one, and the rest of the elements in the group will change as well.
Ps. The Rebar Set parameter won’t help in this case.

hope this help:


array.dyn (8.4 KB)

2 Likes

Thanks @newshunhk for pointing me in the right direction. Your script works for walls, but it doesn’t follow the right distance parameter. I want to use this script for one-click instances.
I was able to use the methods in your script to achieve what I wanted. It allowed me to create a Linear Array with the correct amount of elements, but for some reason, it doesn’t display the right distance I entered. In the image, I input 10 meters on this Structural Footing, but it displays 3.048m.
Hoping someone could help me out.

array2.dyn (7.3 KB)

try not to unwrapelement for IN[2]? I am not sure but it may convert your distance 10m to feet
Revitapi will somehow change your unit to feet

1 Like

Perfect! It works beautifuly now. Like you said, it was about the units, just to convert them from meters to feet and it’s all set. Thanks @newshunhk

1 Like