PDA

View Full Version : AutoLisp Variables



spencer.67965
2004-06-15, 10:29 PM
I was wondering if there is any way to access AutoLisp defined variables in VBA. If this is too vague of a request let me know and I will try and explain it better.

Thanks

jwanstaett
2004-06-16, 01:29 PM
Yes your can use the extended AutoLisp Functions proveded with Visuals lisp
to get AutoLisp defined variables
I attach a class Class Modules TalkToVlist that will do the job

The code use is for Autocad 2002 The TalkToVlisp CLass
will need Vl.Application.1 change in this line to work with 2004
Set myvl = ThisDrawing.Application.GetInterfaceObject("VL.Application.1")

----if you know what to change plase post it, I would like to know too------
NOTE: VL.Application.16 is right

note:
you must have Loaded Visual LISP extensions to AutoLISP for TalkToVlisp to work

(vl-load-com)

This function loads the extended AutoLISP functions provided with Visual LISP. The Visual LISP extensions implement ActiveX and AutoCAD reactor support through AutoLISP, and also provide ActiveX utility and data conversion functions, dictionary handling functions, and curve measurement functions.

If the extensions are already loaded, vl-load-com does nothing.

04/22/06 Just Tested in ADT 2007 work ok use VL.Application.16

spencer.67965
2004-06-16, 03:45 PM
Thanks for the info - i will play around with it and see if I can get it to work. My VBA and Vlisp knowledge is limited so it might take a while, but at least I know its possible.


Thanks again,

Spencer

spencer.67965
2004-06-16, 05:08 PM
I think it might be this . . . ?
("VL.Application.16")

spencer.67965
2004-06-16, 06:01 PM
Well after some tesing I got it to work! I must have gotten lucky or something. Thanks for the help!


Spencer

jwanstaett
2005-08-26, 09:32 PM
They 25 out there some place that down loaded by talk to Vlisp I like some feed back did anyone use it.

jwanstaett
2006-04-21, 01:55 PM
Tested my attachment in autocad 2007 work ok see above post

Terry Cadd
2007-10-10, 11:06 PM
I have been reviewing your code. Can you provide a few standard examples similar to the following for us to go by?
These comments and examples are from another program.

' Get the value of the Lisp symbol 'a'.
' Use (setq a 1234) in Lisp to set it.
a = GetLispSym("a")
Debug.Print "symbol a is: " & a

' Get the Lisp list 'b'.
' Use (setq b (list 100 1.234 "string")) in Lisp to define it.
b = GetLispList("b")
Debug.Print "list b contains:"
For Index = LBound(b) To UBound(b)
Debug.Print b(Index)
Next

Ed Jobe
2007-10-11, 02:39 PM
Check out this post (http://forums.augi.com/showthread.php?t=55637&highlight=vlax).

Terry Cadd
2007-10-11, 06:53 PM
You're too kind! I can't wait to dig into this concept.
Terry