How to use GetBoundingBox ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have a C# Navisworks 2016 plugin that uses Autocad 2016 automation. I read a handle string of an entity from Navisworks and get the corresponding object in autocad with
Autodesk.AutoCAD.Interop.Common.AcadObject ThePart = TheDoc.HandleToObject(HandleToZoom);
then I try to get the bounding box of the entity with
Autodesk.AutoCAD.Interop.Common.AcadEntity TheEnt = (Autodesk.AutoCAD.Interop.Common.AcadEntity)ThePart;
object a;
object b;
TheEnt.GetBoundingBox(out a, out b);
but the GetBoundinBox throws an exception 8020001C
Late binding doesn’t work either,
double[] aMinPoint = new double[3], aMaxPoint = new double[3];
object[] Params = new object[] { aMinPoint, aMaxPoint };
TheEnt.GetType().InvokeMember("GetBoundingBox", System.Reflection.BindingFlags.InvokeMethod, null, TheEnt, Params);
throws an exception too.
How to use the GetBoundingBox correctly?