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

Accessing Global Lisp variable within Dot Net DLL

2 REPLIES 2
Reply
Message 1 of 3
Anonymous
253 Views, 2 Replies

Accessing Global Lisp variable within Dot Net DLL

I use the following code to call a sub in a dot net DLL. Is there a way to
access the value of a global Lisp variable? I don't want to save it to
"users" if i don't have to.

(vl-load-com)
(setq $acad (vlax-get-acad-object))
(setq vbstrcls (vla-GetInterfaceObject $acad
"Elevations.BiFolds"))
(setq out (vlax-invoke-method
vbstrcls
"DrawBiFold"
$acad
fname
(car mod_ins)
(cadr mod_ins)
(- unitID 1)
) ;_ end of vlax-invoke-method
) ;_ end of setq
out
(vlax-release-object vbstrcls)
(vlax-release-object $acad

Dale
2 REPLIES 2
Message 2 of 3
Anonymous
in reply to: Anonymous

If you are calling a function in a COM server you wrote,
why not pass the value of the global LISP var to the
method as a parameter?

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006
http://www.acadxtabs.com

"Dale Levesque" wrote in message news:4989132@discussion.autodesk.com...
I use the following code to call a sub in a dot net DLL. Is there a way to
access the value of a global Lisp variable? I don't want to save it to
"users" if i don't have to.

(vl-load-com)
(setq $acad (vlax-get-acad-object))
(setq vbstrcls (vla-GetInterfaceObject $acad
"Elevations.BiFolds"))
(setq out (vlax-invoke-method
vbstrcls
"DrawBiFold"
$acad
fname
(car mod_ins)
(cadr mod_ins)
(- unitID 1)
) ;_ end of vlax-invoke-method
) ;_ end of setq
out
(vlax-release-object vbstrcls)
(vlax-release-object $acad

Dale
Message 3 of 3
Anonymous
in reply to: Anonymous

ROFL. That was bad. As you can see, I'm already passing several variables
already. What a brain burp.

Thanks Tony.

"Tony Tanzillo" wrote in message
news:4989405@discussion.autodesk.com...
If you are calling a function in a COM server you wrote,
why not pass the value of the global LISP var to the
method as a parameter?

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006
http://www.acadxtabs.com

"Dale Levesque" wrote in message
news:4989132@discussion.autodesk.com...
I use the following code to call a sub in a dot net DLL. Is there a way to
access the value of a global Lisp variable? I don't want to save it to
"users" if i don't have to.

(vl-load-com)
(setq $acad (vlax-get-acad-object))
(setq vbstrcls (vla-GetInterfaceObject $acad
"Elevations.BiFolds"))
(setq out (vlax-invoke-method
vbstrcls
"DrawBiFold"
$acad
fname
(car mod_ins)
(cadr mod_ins)
(- unitID 1)
) ;_ end of vlax-invoke-method
) ;_ end of setq
out
(vlax-release-object vbstrcls)
(vlax-release-object $acad

Dale

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