Hi,
this is the my 1st month of AutoCAD and .NET. I tried to make GetBoundingBox work in .net and I find there are no GetBoundingBox. after search around, I got GeomExtents, I put some code in and I got a compile error message:
"AcDbExtents' is inaccessible due to its protection level." What this mean? How should I deal with it?
here is the code:
public static void GetBoundingBox(ObjectId objId, out Point2d bl, out Point2d tr)
{
Database db = HostApplicationServices.WorkingDatabase;
Transaction trans = db.TransactionManager.StartTransaction();
Editor ed = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;
//
//
Entity ent = (Entity)trans.GetObject(objId,OpenMode.ForRead);
AcDbExtents entExt = ent.GeomExtents;
}
Thank you very much. I really appreciate your help.
Wes
Windows 10 64 bit, AutoCAD (ACA, Map) 2023