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

pspace or mspace using lisp

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
Shneuph
1668 Views, 2 Replies

pspace or mspace using lisp

I've searched and seen a lot of discussion on this sort of topic but not exactly what I'm looking for.

I want to do the equivelant of the "ms" or "ps" command within a layout to switch between model and paper space through a viewport. 

I can't set "cvport" to 1 while in model space and can't set it to 2 or 3 while in paperspace.  Is there a way to do this w/o using (command "mspace") or (command "pspace")?

I don't want to use tilemode as this switches to the model tab.  I want to switch from within the layout.

-Thanks.

---sig---------------------------------------
'(83 104 110 101 117 112 104 64 71 109 97 105 108 46 99 111 109)
2 REPLIES 2
Message 2 of 3
Anonymous
in reply to: Shneuph

You can use ActiveX.

 

(vla-put-MSpace (vla-get-Activedocument (vlax-get-Acad-Object)) :vlax-true)

 

This will make a viewport active, you can then switch by setting the cvport system variable.  Once you want to go back to paper space, just use ' :vlax-false ' instead.

Message 3 of 3
Shneuph
in reply to: Anonymous

Haven't tried it yet but I believe you!  Thanks for the help.

---sig---------------------------------------
'(83 104 110 101 117 112 104 64 71 109 97 105 108 46 99 111 109)

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

Post to forums  

Autodesk Design & Make Report

”Boost