Bounding box of a part

Top  Previous  Next

Here is how to do it, make sure you use the ref keyword in the call though:


           PartDocument EndPlateDoc = CInvHelp.OpenPart(sEndPlateFullFileName, out PartDef);


           Box BBox = PartDef.RangeBox;


           double[] Mins = new double[3];

           double[] Maxes = new double[3];

           BBox.GetBoxData(ref Mins, ref Maxes);


           for (int i = 0; i < 3; i++)



               Debug.Write(" , ");


               Debug.Write(" , ");




These will be in native units, so normally cm.


Text, images and diagrams © 2021 Owen F. Ransen. All rights reserved. (But copy the source code as much as you want!)