TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: DanB on January 26, 2006, 03:26:32 PM
-
As part of another lisp I am working on I wanted to utilize the command "color" which brings up the select color dialog. Any reason this does not "pop up" when run in the following code?
(defun c:coloring (/ oldecho oldcolor newcolor)
(setq oldecho (getvar "cmdecho"))
(setvar "cmdecho" 1)
(setq oldcolor (getvar "cecolor"))
(command ".color" pause)
(setq newcolor (getvar "cecolor"))
(prompt (strcat "\nThe OLD color was <" oldcolor "> and the NEW color is <" newcolor ">"))
(setvar "cmdecho" oldecho)
(princ)
)
Thanks,
Dan
-
Try this.
(setq xclr (acad_colordlg 252))
The 252 at the end is the default value I wanted, you can change it if you like.
-
Thanks, I think that will work, going to need to try it out though...
-
look here (http://hyperpics.blogs.com/beyond_the_ui/autolispvisual_lisp/) .. scroll down to "Adding the ability to select True Colors to your LISP programs"
-
Welcome to the Swamp Lee.
Nice web site, thanks. :-)