I have written a program in C#.net for intellicad as follows.
Code: Select all
using System;
using System.Collections.Generic;
//using System.Linq;
using System.Text;
using IntelliCAD;
using System.Runtime.InteropServices;
using System.Runtime;
namespace ApplicationAddIn
{
class Class1
{
public static void mycmd()
{
IntelliCAD.Application application = (IntelliCAD.Application)Marshal.GetActiveObject("Icad.Application");
IIcadDocument doc = application.ActiveDocument;
IIcadModelSpace modl = doc.ModelSpace;
IntelliCAD.IIcadLibrary lbr = application.Library;
IIcadPoint pnt1 = lbr.CreatePoint(0, 0, 0);
IIcadPoint pnt2 = lbr.CreatePoint(50, 50, 0);
IIcadLine ln = modl.AddLine(pnt1, pnt2);
ln.Update();
Marshal.ReleaseComObject(application);
}
}
}
I am able to compile and load it successfully.
But i am unclear how can i use this as command in intellicad.
Please Help me.
Thanks,
Kumar.