I need to automatically distribute, orientate pipe brackets on distributed expansion sockets along horizontal pipes, such that:
-1-Each bracket should take the same orientation of the pipe.
-2-Each bracket should have the same size of the pipe.
Attached my progress. I think I succeeded-somehow-to distribute brackets along the sockets with the right orientation, but I still not able to make dynamo automatically specifies the size of each bracket according to the pipe. Need your help!
Attached, code, snap shots & I uploaded revit file to wetransfer. @sovitek
You’ll want to take your element list and GetParameterByName for size, similar to how you pulled the Location data.
If the bracket family wisth is an instance parameter it should just be a matter of pushing those sizes to the family after placement. If the bracket is a type family with fixed sizes you’ll need to compare the list of available sizes to your pipe size and pick the closest option, rounding up.
@Robert_Younger
Thanks for your reply. I already tried Element.Parameters, but I couldn’t find the “Connection diameter 1” parameter among the parameters. Check following snapshots:
If that element is a connector, it looks like the inbuilt radius is available as a property via the Revit API - not sure if that helps (MEP isn’t my strong suit):
Hi @enghamada911 Ahmed…you can try something here, but the issue here is the outer diameter on you extension socket dont have an outer diameter the bracket support, are you sure you want place a bracket on your fitting ??..try to play around with it …