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
#2
Well what do you know it worked, my .NET wrappers for SDS also seem to work with Intellicad’s new 6.4 object model, I was able to draw a line using this code. Kewl!
C# !!
[/code]
C# !!
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();
}
}
.Net SDS Api
#3Danielm103,
I'd be very interested in trying out your sds api. I've been using vb6, .net & COM interop to build addins, and I'd love to be able to access some of the extra functionality in the icad api (and finally ditch vb6 and COM!).
thanks!
benqsmith (at) yahoo (dot) com
I'd be very interested in trying out your sds api. I've been using vb6, .net & COM interop to build addins, and I'd love to be able to access some of the extra functionality in the icad api (and finally ditch vb6 and COM!).
thanks!
benqsmith (at) yahoo (dot) com
#5
Hi Danielm,
I am new to Intellicad.
When i tried to use the C# code in my dotnet 2005 ide, at CommandMethod i am getting error.
Please suggess me which reference i need to add to resolve this problem.
Thanks,
Kumar.
I am new to Intellicad.
When i tried to use the C# code in my dotnet 2005 ide, at CommandMethod i am getting error.
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;
Thanks,
Kumar.
#8
Now we have Icad7, many things are changing with the APIs. We are trying to write applications in C#.
How can I make the call of C# functions from the command line?
CommandMethod is not accepted when using the Intellicad Object library.
Are there other dlls necessary?
Any idea where I could get some more information?
How can I make the call of C# functions from the command line?
CommandMethod is not accepted when using the Intellicad Object library.
Are there other dlls necessary?
Any idea where I could get some more information?