I've searched and searched and I can't find a way to simply set the Display Plot Styles variable to off. (unchecked) I don't want to toggle it off/on but instead just set it to 0. Is there a system variable I can set in the command line? I have hundreds and hundreds of files that I need to do this to and I have written a script to automate several other things and I'd like to add this as well. Thanks,
Hi,
>> Is there a system variable I can set in the command line?
No, that is not a system variable, it's a setting of each single layout/pagesetup.
So you need to go through each layout and either uncheck "display plot styles" (or assign "acad.ctb" as plot style?)
- alfred -
I'm afraid you cant't.
But you can do multiple layouts with the Publish command
Or you can try it with the command dwgconvert.
Never tried it though (see attached YouTube video).
I wish this were an option. it is really annoying going into page setup every time. Autodesk ~> Please make us a solution 🙂
@jayN4FCL Looks like no one is able to use any web searches around here 😉
https://forum.bricsys.com/discussion/22058/toggle-display-plot-style-in-layout-tab
Try this one the toggle plot style display for layouts only.
(defun c:togptl (/ doc layouts count index layout currentLayout showPlotStyles);Toggle plotstyle display for layouts only
(vl-load-com)
(setq doc (vla-get-activedocument (vlax-get-acad-object))
layouts (vla-get-layouts doc)
count (vla-get-count layouts)
index 0
currentLayout (getvar "ctab") ; store the current layout name
)
;; Check the ShowPlotStyles state of the first layout (excluding model space) to decide the toggle action
(setq showPlotStyles (vla-get-ShowPlotStyles (vla-item layouts 1))) ; assume the first layout is not model space
(while (< index count)
(setq layout (vla-item layouts index))
;; Skip model space
(if (/= (vla-get-name layout) "Model")
(progn
;; Switch to the layout
(setvar "ctab" (vla-get-name layout))
;; Toggle the ShowPlotStyles and lwdisplay
(if (= showPlotStyles :vlax-true)
(progn
(vla-put-ShowPlotStyles layout :vlax-false)
(setvar "lwdisplay" 0)
)
(progn
(vla-put-ShowPlotStyles layout :vlax-true)
(setvar "lwdisplay" 0)
)
)
;; Enter model space, regen, and return to paper space
(command "_.MSPACE")
(command "_.REGEN")
(command "_.PSPACE")
)
)
(setq index (1+ index))
)
;; Switch back to the original layout
(setvar "ctab" currentLayout)
(vla-regen doc acAllViewports)
(princ)
)
Can't find what you're looking for? Ask the community or share your knowledge.