0
我有以下功能,它通過我的C#桌面應用程序縮放特定的座標,在Autocad Exe中打開一個dxf文件。在C#中的Windows窗體中打開AutoCAD繪圖#
public static void zoomDrwaing(String drawingFile, String lotId)
{
AcadApplication acadApp = null;
AcadDocument doc = null;
double[] coordinates = new double[3];
String errorMessage = "";
try
{
coordinates = ReadCoordinates(drawingFile, lotId); // done via netDxf api
acadApp = new Autodesk.AutoCAD.Interop.AcadApplication();
acadApp.Visible = true;
doc = acadApp.Documents.Open(drawingFile, true);
double[] points = new double[3] { coordinates[0], coordinates[1], coordinates[2] };
acadApp.ZoomCenter(points, 30);
}
catch (Exception ex)
{
errorMessage = ex.ToString();
}
finally
{
if (acadApp != null) Marshal.FinalReleaseComObject(acadApp);
}
}
我想知道是否有裝載AutoCAD的埃克(與縮放DXF文件)內的Windows窗體一個在我的桌面應用程序,它自身而不是單獨打開exe文件的任何可能性。