C#如何对已经打开的CAD操作,求指导啊!!
在CAD中绘制图元AcadApplication CADApp;
AcadDocument CADDoc;
AcadModelSpace CADSpace;
CADApp = new AcadApplication();
每次都要重新打开一个CAD,如果CAD已经打开,该如何操作,指向当前的活动文档。 using aApp = Autodesk.AutoCAD.ApplicationServices.Application;
private AcadApplication _AcadApp;
_AcadApp = (AcadApplication)Marshal.GetActiveObject("AutoCAD.Application." + aApp.Version.Major +"." +aApp.Version.Minor);
_AcadApp = (AcadApplication)Activator.CreateInstance(Type.GetTypeFromProgID("AutoCAD.Application." + aApp.Version.Major + "." + aApp.Version.Minor), true); 好评,非常有用
页:
[1]