SDS .NET API
Posted: Sat Jul 21, 2007 11:03 am
Would anyone here be interested in using/beta testing a .NET API out? It’s still in its infancy, if there is enough interest I will keep hacking at it , else -> bit bucket.
Dan
Dan
Free technical support forum for CMS IntelliCAD and ERP MRP Software
https://www.forums.intellicadms.com/
Code: Select all
//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();
}
}
Code: Select all
using System;
using System.Collections.Generic;
using System.Text;
using IntelliCAD;
namespace ClassLibrary1
{
public class Class1
{
[LispFunction("Test")]
public static void Test1()
{
try
{
IntelliCAD.Application application =
(IntelliCAD.Application)Marshal.GetActiveObject("Icad.Application");
IntelliCAD.Document document = application.ActiveDocument;