PDA

View Full Version : Quickly Toggle Plot styles help!


Gigliano70
2008-02-19, 08:22 PM
Does anyone know of a lisp routine or macro or sysvar that can change the paper space background color on the fly from white to black and back again? or change "display plot styles" on the fly? either would be great. both would be perfect. i am using the black and white paper space and would like to see color when i need to quickly. then revert back to black and white plot styles. thanks in advance for your help.

~Frank

Opie
2008-02-19, 09:59 PM
Have you tried a search for "display plot style (http://forums.augi.com/search.php?query=display+plot+style&exactname=1&starteronly=0&forumchoice[]=91&childforums=1&titleonly=0&showposts=0&replyless=0&replylimit=0&searchthreadid=0&saveprefs=0&quicksearch=0&searchtype=1&nocache=0&ajax=0&userid=0&do=process)" in the AutoLISP forum? I believe the second result has something for you.

.T.
2008-02-19, 10:09 PM
Does anyone know of a lisp routine or macro or sysvar that can change the paper space background color on the fly from white to black and back again? or change "display plot styles" on the fly? either would be great. both would be perfect. i am using the black and white paper space and would like to see color when i need to quickly. then revert back to black and white plot styles. thanks in advance for your help.

~Frank

Hi Frank,

This might get you started on the display plot styles portion. I've been playing with the background color stuff, but I haven't produced satisfactory results yet (a lot of other stuff changes too).


(defun c:togbg (/ lout)
(vl-load-com)
(setq lout (vla-Item
(vla-get-layouts
(vla-get-activedocument
(vlax-get-acad-object)
)
)
(getvar "ctab")
)
)
(if (= (vla-get-ShowPlotStyles lout) :vlax-true)
(progn
(vla-put-ShowPlotStyles lout :vlax-false)
(setvar "lwdisplay" 0)
)
(progn
(vla-put-ShowPlotStyles lout :vlax-true)
(setvar "lwdisplay" 1)
)
)
(vla-regen (vla-get-activedocument (vlax-get-acad-object)) acAllViewports)
(princ)
)


Hope this helps some...

Gigliano70
2008-02-19, 10:58 PM
thanks both.. i'll work on them as soon as possible and let you know of the results.

~Update~ the plot styles toggle works perfectly. now for the color change. then to add them both to a single lisp routine. thanks for the start on the lisp routine Tim.