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

How to (transparently) get out of the viewport back into paper space?

3 REPLIES 3
Reply
Message 1 of 4
scot-65
459 Views, 3 Replies

How to (transparently) get out of the viewport back into paper space?

I'm trying to limit the activity inside a paper space's viewport.

Specifically text and dimension objects (our routines) as these layers inside the viewport may be frozen.

 

How do I pragmatically get out of the viewport back into paper space?

 

Command: _.PSPACE
Command: cvport
Enter new value for CVPORT <1>:

Command: _.MSPACE
Command: cvport
Enter new value for CVPORT <2>: 1
Cannot set CVPORT to that value.
*Invalid*

 

Thanks in advance.

scot-65

 


Scot-65
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.


3 REPLIES 3
Message 2 of 4
Kent1Cooper
in reply to: scot-65


@scot-65 wrote:

.... 

How do I pragmatically get out of the viewport back into paper space?

....


Something as simple as (command "_.pspace") ought to do it, unless I'm misunderstanding.

Kent Cooper, AIA
Message 3 of 4
scot-65
in reply to: Kent1Cooper

I may not have correctly formulated the statement the first time around...
(if (> (getvar "CVPORT") 1) (command ".pspace") );if

Now I have discovered that the subroutine call to check for cvport is placed further down the routine (inside the "main" section and not before the user input part of the program - I.E.: must be placed before getpoint).

Thanks anyways.
scot-65

Scot-65
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.


Message 4 of 4
Ian_Bryant
in reply to: scot-65

Hi, if you wish to avoid the command function

e.g. inside a reactor function

or in a function to be used with vlax-add-command

to create a transparent command

you can try the following:

(and
  (= (getvar "TILEMODE") 0)
  (> (getvar "CVPORT") 1)
  (vla-put-Mspace (vla-get-activedocument (vlax-get-acad-object)) 0)
)

 

Ian

 

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

Post to forums  

Autodesk Design & Make Report

”Boost