[CommandMethod("testd")] public void testd() { AcadApplication acadapp = (AcadApplication)Application.AcadApplication; try { Object ps,pe; ps = acadapp.ActiveDocument.Utility.GetPoint(,"指定起点"); pe = acadapp.ActiveDocument.Utility.GetPoint(ps,"指定终点:"); AcadLine acadline =acadapp.ActiveDocument.ModelSpace.AddLine(ps,pe); } catch(System.Exception e) { Autodesk.AutoCAD.ApplicationServices.Application.ShowAlertDialog(e.Message); } } 用C# 怎么处理红色的东西? |