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
Search this forum for 'acedInvoke', and you will find some VB.NET code that can
be used to call LISP command functions.
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
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.
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.