Hi Great Friends,
I have an area reinforcement and got all the Rebar in system form it and I got all the properties of that except the distribution direction of each rebar ( i need it because i want to change the rebar curves and then re-create the rebar sets again with the new update shapes for them).
So, who can i get the distribution direction of each rebar ?
Any help or ideas will be very appreciated
Thanks in advance.
Is there any way to get the distribution direction for rebar sets ?!
@Alisadeq PLEASE find the attachments :
test.dyn (16.0 KB)
Hi @hanywillim
As you want to know the distribution direction and the Array length. Here it is please find the snip below.
And Here’s the piece of code that’ll help you get the vector/direction for the distribution.
# Input list of elements
barsystem = UnwrapElement(IN[0]) #The barsystems coming in a flattened list
direction = [i.GetDistributionPath().Direction.ToVector() for i in barsystem] #getting the direction out of individual system
OUT = direction
Regards,
BM
2 Likes
and another alternative way maybe
2 Likes
Works Fine, Many Thanks Bro, can you provide me with your resources to work with Revit API to get something like this code in the future.
Thanks in Advance.
@bharat.minocha Do you think there is a better way to get the rebars in a host directly than the one i used (collect all rebars and then get their host and then get only the chosen hosts)?
Seems good @hanywillim , Along if you want to use another way around you can look for this method Floor Members (revitapidocs.com)
But in this also you need to look for rebars only as there will be multiple dependent elements over it.
Regards,
BM