SetDimensionValue for TrapeezeHanger
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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.
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):
Code provide below...
if (def.Name == "Width")
{
part.SetDimensionValue(def, val * 2); <-------- what is the problem with this?
}