Page 1 of 1
SDS .NET API
Posted: Sat Jul 21, 2007 11:03 am
by Danielm103
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
Posted: Sun Oct 07, 2007 1:23 pm
by Danielm103
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: 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]
.Net SDS Api
Posted: Mon Oct 08, 2007 8:17 am
by benqsmith
Danielm103,
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
Posted: Tue Oct 23, 2007 9:01 am
by Danielm103
I haven’t forgotten about you. I ran into issues with forms not working correctly with certain functions, such as GetPoint(). Once I get this solved I will let you all know. I am also considering making this an open source project and posting the source on one of the open source sites.
Dan
Posted: Tue Nov 30, 2010 4:03 am
by giskumar
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.
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;
Please suggess me which reference i need to add to resolve this problem.
Thanks,
Kumar.
Posted: Tue Nov 30, 2010 4:32 am
by giskumar
Hi,
After some research, i found the command method [Lispfunction] will comes with acdmg.dll. If we dont have installed Autocad 2010 product, can't use [LispFunftion].
Is there any related command method is there in Intellicad namespace.
Thanks in advance,
Kumar.
Posted: Sat Jan 08, 2011 9:17 am
by Danielm103
Sorry, I wrote that module quite a long time ago, I haven't been keeping it up to date as there didn;t seem to be much interest. About the only thing I am maintaining in SDS is SQLite for autolisp.
cheers
Posted: Fri Mar 09, 2012 1:01 pm
by MROCK
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?
Posted: Mon Mar 12, 2012 5:52 am
by JCAMPOS
MROCK,
Are you talking about SDS? Or other environment?
You can write C# applications through different ways. I suppose it will all depend on your particular needs. The developers reference in the program's help should give you a light of the available options.
Regards,
JCAMPOS