SetDimensionValue for TrapeezeHanger

SetDimensionValue for TrapeezeHanger

Arturo_Altamirano6ZXJU
Explorer Explorer
97 Views
0 Replies
Message 1 of 1

SetDimensionValue for TrapeezeHanger

Arturo_Altamirano6ZXJU
Explorer
Explorer

Trying to adjust the 'Width' FabricationDimension dim object for a series of TrapeezeHangers created with CreateHangers. Get an unspecified error if I try to adjust these values at all, and from what I can see, there is no direct way to do what I want properly

End goal is to programmatically extend these trapeeze hangers to span multiple pipes so I can save my users from having to do so manually.  For now, I am just trying to find a way to make them span more distance so as to visually span multiple pipes. 

 

Top is what I want, bottom is what is placed by default. These are strut hangers with rods.

Screenshot 2025-07-01 150311.png

 

Have tried multiplying all dimensions to preserve any ratio that might be there, but it fails no matter what the change is.

 

All parameters of the hanger element (foreach param in hangerElement.Parameters):

Screenshot 2025-07-01 150216.png

 

Code provide below...

 

if (def.Name == "Width")

{

        part.SetDimensionValue(def, val * 2);    <-------- what is the problem with this?

}

trapeeze.png

0 Likes
98 Views
0 Replies
Replies (0)