嘿,米克,很抱歉抢走了你的帖子…我在为SDS制作.NET包装方面做得太多了。足够做到这一点
- //intellicad COM
- [CommandMethod("Test")]
- public static void Test1()
- {
- try
- {
- IntelliCAD.Application application =
- (IntelliCAD.Application)Marshal.GetActiveObject("Icad.Application");
- IntelliCAD.Document document = application.ActiveDocument;
- IntelliCAD.ModelSpace modelspace = document.ModelSpace;
- IntelliCAD.Library library = application.Library;
- IntelliCAD.Point point1 = library.CreatePoint(0,0,0);
- IntelliCAD.Point point2 = library.CreatePoint(100,100,0);
- IntelliCAD.Line line = modelspace.AddLine(point1, point2);
- line.Update();
- Marshal.ReleaseComObject(application);
- }
- catch (SystemException e)
- {
- DWM.Cad.RuntimeServices.Utilities.WriteMessage(e.Message);
- }
- }
- //through the lisp engine
- [CommandMethod("TestLine1")]
- public static void Testline1()
- {
- using (Line myLine = new Line())
- {
- myLine.Layer = "0";
- myLine.StartPoint = new Point3D(0, 0, 0);
- myLine.EndPoint = new Point3D(100, 100, 0);
- myLine.Update();
- }
- }
虽然这是为SDS构建的,但我们/我可能能够为Bricscad/Drx整合一些东西
我一直在拖延,直到ITC发布它的SDK版本,但看到有C/C++天赋的人不得不使用VBA,我感到很难过 
无论如何,可以从C#访问DRX、SDS和COM |