PDA

View Full Version : Toggle imageframe



pmedina
2004-06-16, 07:28 PM
Can i toggle between imageframe on and off using a single lisp routine?
Thanks

stig.madsen
2004-06-16, 09:30 PM
The imageframe is controlled by a dictionary in the main dictionary (the NOB). It's not always safe to modify those thingies but I haven't found a problem with the function below.


(defun C:IFRAME (/ frameVal imgDict)
(cond ((setq imgDict (dictsearch (namedobjdict) "ACAD_IMAGE_VARS"))
(setq frameVal (cdr (assoc 70 imgDict)))
(entmod (subst (cons 70 (nth frameVal '(1 0)))
(assoc 70 imgDict)
imgDict
)
)
)
)
(command "REGEN")
(princ)
)

Mike.Perry
2004-06-17, 06:20 AM
Hi

If you have Express Tools you could use TFRAMES, below is from the ExpressTools Help File -

<snip>
Toggles the state of frames for Wipeout and image objects. If frames are turned on, this command turns them off, and vice versa.
</snip>

Have a good one, Mike

stig.madsen
2004-06-17, 08:07 AM
I had the feeling of reinventing the wheel (once more). Oh well, the more tips the merrier.
Thanks Mike.

moshira_hassan
2004-06-17, 03:09 PM
why don't u use object --- image --- frame --- on/off from the tools pull down menu?/?