MiGo Posted April 15, 2009 Posted April 15, 2009 How does one capture the imageframe setting and set something to it? (setq Iframe... I'm after turning the image frame on and then returning it to it's original number, but i'm not sure how to capture the original number. Quote
The Buzzard Posted April 15, 2009 Posted April 15, 2009 There are no variables for this command so you may have to do it like this: (setq IFRAME-ON (command "_.IMAGEFRAME" "ON")) (setq IFRAME-OFF (command "_.IMAGEFRAME" "OFF")) The Buzzard Quote
MiGo Posted April 15, 2009 Author Posted April 15, 2009 When using imageframe the options are 0, 1, 2 so the whole on/off part won't work. On every drawing that I have dealt with the imageframe has always been set to zero, but I just wanted to try and capture that integer and set it back. Quote
The Buzzard Posted April 15, 2009 Posted April 15, 2009 Once again but this time from AutoCAD help section Commands IMAGEFRAME Controls whether image frames are displayed or hidden from view System Variables No entries. There are no variables unless you set to a variable yourself. Quote
The Buzzard Posted April 15, 2009 Posted April 15, 2009 I do not believe that is part of the same command Lee. Quote
MiGo Posted April 15, 2009 Author Posted April 15, 2009 IMAGEHLT set to zero makes it so the border hightlits if on when over the image border. If set to one it makes a cross pattern over the image when selected or if hovering over border that is set at 45deg box pattern. Quote
Lee Mac Posted April 15, 2009 Posted April 15, 2009 I do not believe that is part of the same command Lee. My mistake - sorry guys Quote
The Buzzard Posted April 15, 2009 Posted April 15, 2009 Try this (defun C:IMGFRAME () (setq IFRAME (getint "\nEnter An Integer:")) (progn (if (= IFRAME 1) (command "_.IMAGEFRAME" "ON") ) (if (= IFRAME 0) (command "_.IMAGEFRAME" "OFF") ) ) ) Quote
wizman Posted April 15, 2009 Posted April 15, 2009 (setq iframe (cdr (assoc 70 (dictsearch (namedobjdict) "ACAD_IMAGE_VARS")))) 0 => Imageframe set to Off 1 => Imageframe set to On 3 => Imageframe set to On but will not plot Quote
Lee Mac Posted April 15, 2009 Posted April 15, 2009 Try this (defun C:IMGFRAME () (setq IFRAME (getint "\nEnter An Integer:")) (progn (if (= IFRAME 1) (command "_.IMAGEFRAME" "ON") ) (if (= IFRAME 0) (command "_.IMAGEFRAME" "OFF") ) ) ) Buzzard, I'd be more inclined to use COND in this instance: (defun C:IMGFRAME (/ IFRAME) (initget 5) (setq IFRAME (getint "\nEnter An Integer:")) (cond ((= IFRAME 1) (command "_.IMAGEFRAME" "ON")) ((= IFRAME 0) (command "_.IMAGEFRAME" "OFF")) (T (princ "\nNo a Valid Integer"))) (princ)) Not meaning to sounds critical - only helpful Quote
The Buzzard Posted April 15, 2009 Posted April 15, 2009 Your known to be more precise Lee. We have come to expect that. And I would not expect less. I just did that one fast off the top of my head. But thats excellent. What do you expect from a Buzzard with a bird brain. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.