Accessing Global Lisp variable within Dot Net DLL

Accessing Global Lisp variable within Dot Net DLL

Anonymous
Not applicable
540 Views
2 Replies
Message 1 of 3

Accessing Global Lisp variable within Dot Net DLL

Anonymous
Not applicable
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
0 Likes
541 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
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
0 Likes
Message 3 of 3

Anonymous
Not applicable
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
0 Likes