Where did the AutoCAD ApplicationAcadApplication API go?
I am trying to write a method to zoom in on a drawing in AutoCAD using C # .NET and the latest ObjectARX. I searched Google for an example of who did this and found this post which has the following method:
[CommandMethod("zoomExtentTest")]
public static void zoomExtentTest()
{
//using InvokeMember to support .NET 3.5
Object acadObject = Application.AcadApplication;
acadObject.GetType().InvokeMember("ZoomExtents", BindingFlags.InvokeMethod, null, acadObject, null);
}
When I tried to copy the code, I got an error saying Autodesk.AutoCAD.ApplicationServices.Application has no definition for AcadApplication, so I assume it was replaced with something else, but I don't know where I would find such a replacement or how I rewrote the above method to work with the current AutoCAD.NET API.
+3
source to share