I'm trying to write a method to zoom to the extents of a drawing in AutoCAD using C#.NET and the latest version of ObjectARX. I googled for an example of someone doing that 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 defintion for AcadApplication so I'm guessing it got replaced with something else but I don't know where I'd find such a replacement or how I'd rewrite the above method to work with the current AutoCAD .NET API.