mvports off lsp

mvports off lsp

Anonymous
Not applicable
794 Views
2 Replies
Message 1 of 3

mvports off lsp

Anonymous
Not applicable

hello. this lsp is off vports the selected objects.
(defun c:mvf (/ clay ss) 
(setq clay (getvar "clayer"))
(setq ss (ssget))
(command "-vports" "off" ss "")
(setvar "clayer" clay)
(princ)
)

but, I want to turn off the viewports except the selected objects.  some help. plz

thank you for reading it.

0 Likes
Accepted solutions (1)
795 Views
2 Replies
Replies (2)
Message 2 of 3

Moshe-A
Mentor
Mentor

Hi,

 

Something like this?

 

(defun c:mvf (/ ss)
 (setvar "tilemode" 0)   ; switch to layout
 (command "pspace")      ; make sure in pspace
  
 (if (setq ss (ssget '((0 . "viewport"))))
  (progn
   (command "-vports" "off" "si" "all")
   (command "-vports" "on" "si" ss)   
  )
 )

 (princ)
)

 

enjoy

moshe

 

 

Message 3 of 3

Anonymous
Not applicable
Accepted solution

thank you for your help.


@Moshe-A wrote:

Hi,

 

Something like this?

 

(defun c:mvf (/ ss)
 (setvar "tilemode" 0)   ; switch to layout
 (command "pspace")      ; make sure in pspace
  
 (if (setq ss (ssget '((0 . "viewport"))))
  (progn
   (command "-vports" "off" "si" "all")
   (command "-vports" "on" "si" ss)   
  )
 )

 (princ)
)

 

enjoy

moshe

 

 


 

0 Likes