Message 1 of 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi.
I've been adding some features to our drawing template.
One handy iLogic code I've added gets the extents of a selected part in an assembly,
which are then used to create a default description for the part.
Unfortunately, sometimes the extents don't show accurate measurements.
I found this is due to the rangebox being aligned with the assembly's UCS as opposed to the UCS of the part itself:
In the above case, the extents would show a much smaller height for the padeye, since it is at an angle in the assembly.
My question is: is there a way to get the extents of the part's rangebox, with the extents aligned to the part's UCS?
Currently, I get the extents like this:
'get the bounding box
oRB = oOcc.RangeBox 'oOcc is the component occurrence.
'declare min and max points
Dim minp As point = oRB.minPoint
Dim maxp As point = oRB.maxPoint
'find difference between min and max points
X = Round(uom.ConvertUnits ((maxP.X - minP.X), "cm", uom.LengthUnits), 0)
Thanks!
Solved! Go to Solution.