.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Get AutoCAD Electrical Lisp value

5 REPLIES 5
Reply
Message 1 of 6
Gaituuth
1085 Views, 5 Replies

Get AutoCAD Electrical Lisp value

Hi,

 

I'm new to .NET and I'm trying to convert some of my old Vba routines into vb.Net.

In Vba I have class module which returns me lisp variable values. With special thanks to Mr. Oquendo

Unfortunately ACE (AutoCAD Electrical) is based on lisp which has some disadvantages.

In Vba I'm having the following lines to get back the result as Vba variable.

 

objVLAX.EvalLispExpression ("(setq scratch_fnam (c:wd_mdb_get_proj_scratch_dbnam nil))")
' Get database path
RetVal = objVLAX.EvalLispExpression("scratch_fnam")

 

I don't want to use a COM / Interop object because I've heard some rumours this will disappear in the 2012 release.

Is there a example available which can return a lisp variable back into vb.NET?

 

The "RetVal" I'm going to use for connecting to this "RetVal" database and pulling/changing values.

 

Regards,

 

Gerald

 

 

 

5 REPLIES 5
Message 2 of 6
caddzone
in reply to: Gaituuth

Search this forum for 'acedInvoke', and you will find some VB.NET code that can

be used to call LISP command functions.

 

 



AcadXTabs for AutoCAD
Supporting AutoCAD 2000-2011


Message 3 of 6
Gaituuth
in reply to: Gaituuth

Hi Toni,

 

Thanks for your reply.

For me it's a now a little bit to find the right tree in the forest of .Net. I found some hits on Acedinvoke.

But a good example is still missing 😞

 

Is it possible that you can post something as start approach or a few more hints?

 

 

Regards,

 

Gerald

 

 

Message 4 of 6
caddzone
in reply to: Gaituuth

Sorry, I don't have any VB.NET samples, only the C# ones that I've posted in the past.

 

Hopefully someone else that has done this in VB.net can post some.



AcadXTabs for AutoCAD
Supporting AutoCAD 2000-2011


Message 5 of 6
phoinix
in reply to: Gaituuth

Try Looking at this thread

 

http://www.theswamp.org/index.php?topic=33352.0

 

 

Message 6 of 6
caddzone
in reply to: Gaituuth

If you're using AutoCAD 2011, the Application class has a new method

called "Invoke()", that is a wrapper for acedInvoke(), which uncomplicates

things a bit.

 

Invoke() takes a ResultBuffer as an argument, and expects the name of

the LISP function you're calling to be in the first element, with subsequent

elements containing the arguments.

 



AcadXTabs for AutoCAD
Supporting AutoCAD 2000-2011


Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost