Author Topic: ImageFrame....  (Read 2076 times)

0 Members and 1 Guest are viewing this topic.

Andrea

  • Water Moccasin
  • Posts: 2372
ImageFrame....
« on: June 16, 2005, 02:26:00 PM »
Hi all,..

a little question...

How can I keep "imageframe" in memory ?

I can't do (getvar "imageframe").....

is there any other variable ?

thanks
Keep smile...

dubb

  • Swamp Rat
  • Posts: 1105
ImageFrame....
« Reply #1 on: June 16, 2005, 02:33:20 PM »
well...cant you just use
(command "imageframe" "on")

Crank

  • Water Moccasin
  • Posts: 1503
ImageFrame....
« Reply #2 on: June 16, 2005, 02:54:33 PM »
There are three states 0, 1 or 2 so you can show the image but not having it plotted. This command is saving the value in the drawing in the dictionary ACAD_IMAGE_VARS.
Observere that AutoCAD 2006 has three states now 0, 1 or 2 but the dictionary value is 0, 1 or 3  :!:
A simple way to retrieve the value is:
Code: [Select]

(defun imageframe ()
  (setq dict (dictsearch (namedobjdict) "ACAD_IMAGE_VARS"))
  (if (not dict)
     0
     (cdr (assoc 70 dict))
  )
)
Vault Professional 2023     +     AEC Collection

Andrea

  • Water Moccasin
  • Posts: 2372
ImageFrame....
« Reply #3 on: June 16, 2005, 05:37:23 PM »
Quote from: dubb
well...cant you just use
(command "imageframe" "on")


not useful..
Keep smile...

Andrea

  • Water Moccasin
  • Posts: 2372
ImageFrame....
« Reply #4 on: June 16, 2005, 05:37:59 PM »
Quote from: Crank
There are three states 0, 1 or 2 so you can show the image but not having it plotted. This command is saving the value in the drawing in the dictionary ACAD_IMAGE_VARS.
Observere that AutoCAD 2006 has three states now 0, 1 or 2 but the dictionary value is 0, 1 or 3  :!:
A simple way to retrieve the value is:
Code: [Select]

(defun imageframe ()
  (setq dict (dictsearch (namedobjdict) "ACAD_IMAGE_VARS"))
  (if (not dict)
     0
     (cdr (assoc 70 dict))
  )
)


thanks Crank..
Keep smile...

Andrea

  • Water Moccasin
  • Posts: 2372
ImageFrame....
« Reply #5 on: June 20, 2005, 01:51:27 PM »
Quote from: Andrea
Quote from: Crank
There are three states 0, 1 or 2 so you can show the image but not having it plotted. This command is saving the value in the drawing in the dictionary ACAD_IMAGE_VARS.
Observere that AutoCAD 2006 has three states now 0, 1 or 2 but the dictionary value is 0, 1 or 3  :!:
A simple way to retrieve the value is:
Code: [Select]

(defun imageframe ()
  (setq dict (dictsearch (namedobjdict) "ACAD_IMAGE_VARS"))
  (if (not dict)
     0
     (cdr (assoc 70 dict))
  )
)


thanks Crank..


Oops,....Crank,

Your code is not working the first time..
need to run the "imageframe" first...

;-(
Keep smile...

Crank

  • Water Moccasin
  • Posts: 1503
ImageFrame....
« Reply #6 on: June 21, 2005, 07:26:13 AM »
Quote from: Andrea
Quote from: Andrea
[...]
Oops,....Crank,

Your code is not working the first time..
need to run the "imageframe" first...

;-(


The command IMAGEFRAME creates the dictionary. If the dictionary doesn't exist, then this function returnes 0 (= off).
So I don't think that you have to use the command IMAGEFRAME first to get the value.
Vault Professional 2023     +     AEC Collection