modify ACAD_IMAGE_VARS using VL.Application

modify ACAD_IMAGE_VARS using VL.Application

Anonymous
Not applicable
436 Views
2 Replies
Message 1 of 3

modify ACAD_IMAGE_VARS using VL.Application

Anonymous
Not applicable
Did anybody made successful changes to the ACAD_IMAGE_VARS using the VL Application?
I can retrieve the value of the ImageFrame status(0,1 or 3) but cannot change it?
If i execute the following statement in the AutoCAD command the status of the ImageFrame is changed, however it will not when the lisp expression is evaluated using VL.
(setq dict (dictsearch (namedobjdict) "ACAD_IMAGE_VARS"))(entmod (subst (cons 70 0) (assoc 70 dict) dict))

Set vlApp = Application.GetInterfaceObject("VL.Application.16")
Set vlFunctions = vlApp.ActiveDocument.Functions
Set vlFuncCall = vlFunctions.Item("read").funcall(lispCommand)
call vlFunctions.Item("eval").funcall(vlFuncCall)

Every time I get Type Mismatch errors.
I tried it with the Vlax.cls class, executed (vl-load-Com) first, executed imageframe OFF to be sure the dictionary and its vars are there, (vl-cmdf (..)) etc.

Thanks for any help
Frits
0 Likes
437 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
Frits,

(setq dict (dictsearch (namedobjdict) "ACAD_IMAGE_VARS"))(entmod (subst
(cons 70 0) (assoc 70 dict) dict))

Maybe it is the imbedded quotes in your lisp command string? Try using
chr(32) concatenation instead.

Best Regards,
Wayne
www.plotstream.com


"Frits9" wrote in message news:6028878@discussion.autodesk.com...
Did anybody made successful changes to the ACAD_IMAGE_VARS using the VL
Application?
I can retrieve the value of the ImageFrame status(0,1 or 3) but cannot
change it?
If i execute the following statement in the AutoCAD command the status of
the ImageFrame is changed, however it will not when the lisp expression is
evaluated using VL.
(setq dict (dictsearch (namedobjdict) "ACAD_IMAGE_VARS"))(entmod (subst
(cons 70 0) (assoc 70 dict) dict))

Set vlApp = Application.GetInterfaceObject("VL.Application.16")
Set vlFunctions = vlApp.ActiveDocument.Functions
Set vlFuncCall = vlFunctions.Item("read").funcall(lispCommand)
call vlFunctions.Item("eval").funcall(vlFuncCall)

Every time I get Type Mismatch errors.
I tried it with the Vlax.cls class, executed (vl-load-Com) first, executed
imageframe OFF to be sure the dictionary and its vars are there, (vl-cmdf
(..)) etc.

Thanks for any help
Frits
0 Likes
Message 3 of 3

Anonymous
Not applicable
Thank you Wayne for you're suggestion, however this lisp command gives me the returnvalues , 0, 1 (or 3 in 2008)
(setq FrameStatus (cdr (assoc 70 (setq dict (dictsearch (namedobjdict) "ACAD_IMAGE_VARS")))))

Greetings,
Frits
0 Likes