Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to switch off all viewports in paperspace from modelspace?

4 REPLIES 4
Reply
Message 1 of 5
angelo
183 Views, 4 Replies

How to switch off all viewports in paperspace from modelspace?

I have some big dwg showing multiple viewports (to be plotted)
in paperspace. When I toggle to paperspace all viewports are
ON, so that my pc is becoming very slow.
I would like to wrote a lisp switching all viewports OFF before
toggle from modelspace: how to do that?
Thanks a lot,
Angelo
4 REPLIES 4
Message 2 of 5
Anonymous
in reply to: angelo

The trick is to turn them off while in PS, before switching to MS. Then,
when you switch back to PS, they'll already be off. The MVIEW / Off / All
command will do the trick if the viewport borders are on a thawed layer; or
you can use a LISP function like:

(command "_.mview" "_off" (ssget "x" '((0 . "viewport"))) "" "_y")
___

"angelo" wrote in message
news:f087471.-1@WebX.maYIadrTaRb...
> I have some big dwg showing multiple viewports (to be plotted)
> in paperspace. When I toggle to paperspace all viewports are
> ON, so that my pc is becoming very slow.
> I would like to wrote a lisp switching all viewports OFF before
> toggle from modelspace: how to do that?
> Thanks a lot,
> Angelo
>
Message 3 of 5
jmodglin
in reply to: angelo

Angelo, try something like this, (VL-LOAD-COM)
(SETQ SS (SSGET "X" (LIST (CONS 0 "VIEWPORT")(CONS -4 ">")(CONS 68 0))))
(SETQ CNT (SSLENGTH SS))
(WHILE (> CNT 0)
(SETQ VP (VLAX-ENAME->VLA-OBJECT (SSNAME SS (- CNT 1))))
(VLA-PUT-VIEWPORTON VP :VLAX-FALSE)
(SETQ CNT (- CNT 1))
); It puts all viewports that are on into the selection set "SS". The DXF code of whether they are on or off is 68. I hope this helps. Joshua Modglin
Message 4 of 5
Anonymous
in reply to: angelo

It's so much easier than that. Just set MAXACTVP to its minimum value of
two... one for the pspace viewport and one for at least one mspace viewport.
You may not see the viewport contents, but they will still plot! If you
really want to speed things up, make a dummy viewport with every layer
frozen via VPLAYER, and make it the active viewport. Do all of the above
before saving the file.

--
John Uhden, Cadlantic/formerly CADvantage
--> mailto:juhden@cadlantic.com
--> http://www.cadlantic.com
2 Village Road
Sea Girt, NJ 08750
Tel. 732-974-1711
FAX 732-528-1332

"angelo" wrote in message
news:f087471.-1@WebX.maYIadrTaRb...
> I have some big dwg showing multiple viewports (to be plotted)
> in paperspace. When I toggle to paperspace all viewports are
> ON, so that my pc is becoming very slow.
> I would like to wrote a lisp switching all viewports OFF before
> toggle from modelspace: how to do that?
> Thanks a lot,
> Angelo
>
Message 5 of 5
Anonymous
in reply to: angelo

John Uhden wrote in message
news:F5E6616DFC2116C7781758313D8765FE@in.WebX.maYIadrTaRb...
> It's so much easier than that. Just set MAXACTVP to its minimum value of
> two... one for the pspace viewport and one for at least one mspace
viewport.
> You may not see the viewport contents, but they will still plot! If you

That's the *right* way of working with PS!! I only whish they'd get a hint
and
finally FINALLY lift this senseless restriction on MAXACTVP so we could
all just happily set it to 1! (or change its meaning to NOT include pspace
viewport itself, so we'd set it to 0 which would make even more sense).

And of course setting VPs OFF is totally wrong since they won't get plotted
that way and you'd have to turn them ON before plot, and if you don't
_forget_
to do that, you'd still have to wait a lot while they are REGENERATING! *)

Of course the drawback of doing things the right way is to not be able
to blame slow work on "that slow computer" or "that heavy file". 🙂


> really want to speed things up, make a dummy viewport with every layer
> frozen via VPLAYER, and make it the active viewport. Do all of the above
> before saving the file.
>
> --
> John Uhden, Cadlantic/formerly CADvantage
> --> mailto:juhden@cadlantic.com
> --> http://www.cadlantic.com


--
Have fun, 🙂
Vlad http://vnestr.tripod.com/
(define (list . args) args)

------
*) Well, another trick is to press ESC when that happens. VPs won't show
much but they will be marked as open as thus will be plotted OK. Another
time saver.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost