@GeeHaa wrote:
; error: ActiveX Server returned the error: unknown name: GETVARIABLE
(setq units (vlax-variant-value (vlax-invoke-method mydoc 'getvariable "insunits")))
(if (= units 4)
(setq cvu 25.4)
(setq cvu 1.0)
)
Unfortunately, for ObjectDBX, there are following rules i.e. what doesn't work
No Selection Sets (use of ssget, ssname, ssdel etc)
No Command calls (command "_.line" ... etc)
No ent* methods (entmod, entupd etc)
No access to System Variables (getvar, setvar, vla-getvariable, vla-setvariable etc)
Check here
So in other words, use open drawing method instead: open drawing(s), extract and or set system variable and close
or use batch processing using accoreconsle which supports getvar setvar commands. Check my older posts I have somewhere posted whole guide for using lisps inside accoreconsle.
Miljenko Hatlak

Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.