Change Visual Style in ALL Viewports

I perform this manual & arduous task routinely, click inside very viewport on every layout and run either:

VS enter 2 enter

or

VS enter E enter

One changes the Visual Style to 2DWireframe, the other changes the VS to Shaded with Edges.

Anyone know of a possibility to change all Viewports in one command string?

VS enter 2 enter A enter (VS 2 A=all would be cool)

or a LISP?

I change from 2D Wireframe after dimensioning and before I publish to Shaded with Edges.

After checking I change all Viewport VS's back to 2D Wireframe, dimension then back to Shaded with Edges prior to publishing to PDF again, rinse and repeat because performance extremely poor in paperspace with 3D Shaded Viewports compared to AutoCAD. It's such a time consuming process i'd like to save time on.

Comments

  • Use the following Lisp code for PaperSpace Viewports :

    (defun c:changeVisualSTL_VP_PS ( / i vStyle vportsPS vpps)
    (setq vStyle (getint "Enter a number for VisualStyle 1 for Wirframe, 7 for Shaded with Edges :" )
    i 0
    )
    (print "Select Paperspace ViewPorts :" )
    (setq vportsPS (ssget '((0 . "VIEWPORT"))))

    (while (< i (sslength vportsPS))
    (setq vpps (vlax-ename->vla-object (ssname vportsPS i) ))
    (vlax-put-property vpps "VisualStyle" vStyle)
    (setq i (1+ i))
    )
    )

  • …and for other VisualStyles…:
    1 2dWireframe
    2 Conceptual
    3 Hidden
    4 Modeling
    5 Realistic
    6 Shaded
    7 Shaded with Edges
    8 Shades of Grey
    9 Sketchy
    10 Wireframe
    11 X-Ray