• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

pass data from vba to lisp

  • Thread starter Thread starter carry
  • Start date Start date

carry

Guest
Hi.
I installed autocad 2012, the function below, which passes data from vba to lisp, with 2008 was perfectly working, now with 2012 it no longer works.
the problem lies in sym, is declared as an object but evidentmete not enough, someone has any idea?
Thank you.

in local variables I read:
symbolname ="#listanomi" and is ok
value ="()" and is ok sym = nothing
vl è ok mi da "visual lisp"


sub putlisp(symbolname as string, value as string)
dim sym as object
if vl is nothing then '
set vl = thisdrawing.application.getinterfaceobject("vl.application.16")
'set vl = createobject("vl.application.16")end ifset sym = vl.activedocument.functions.item("read").funcall(symbolname)vl.activedocument.functions.item("set").funcall sym, value
end sub
 
which library in vba references have you uploaded?
I ask you why to use the createdobject("vl.application.16"), you must necessarily communicate to vba which library to use.

bye
 
ciao rpor66
come sempre credo probabilmente ci hai azzeccato, in autocad 2008 ho caricato visual lisp acttivex module, vl16.tbl, si trova nella cartella autocad2xxx.
ora non posso verificare ho soltanto il 2008, appena posso verifico, e ti faccio sapere.
grazie
ciao
 
Hi.
Sorry I'm late, but I'm back from vacation.
confirm that in autocad 2012 the visual library lisp remains vl16 and is located
in the main autocad folder and is called vl16.tlb.
I return to the initial question, I have these program lines
if I use f8 to check step by step it works,
Turning it doesn't want to work.

in local variables I read:
symbolname = "#listanomi" and is ok
value ="(hea200)" and is ok sym = nothing
vl è ok mi da "visual lisp"


sub putlisp(symbolname as string, value as string)
dim sym as object
if vl is nothing then '
set vl = thisdrawing.application.getinterfaceobject("vl.application.16")
set vl = createobject("vl.application.16")
end ifset sym = vl.activedocument.functions.item("read").funcall(s ymbolname)vl.activedocument.functions.item("set").funcall sym, value
end sub

ora mi si inchioda alla riga blonde,
mi da
error run-time '2000' member not found:funcallsomeone has ideas
Thank you.
 
Unfortunately, I can't help you with the vba, now rebelled, but anyway, why don't you use .sendcommand? that it is a string rather than a carrier, set a variable or create a list is relatively easy.

bye
 
hi rpor66 senpre available and kind
Good idea I didn't think about it, great today I try.
Thank you
Greeting
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
Back
Top