VP Freeze/Thaw in all Viewports in all Drawings

VP Freeze/Thaw in all Viewports in all Drawings

Anonymous
Not applicable
2,777 Views
5 Replies
Message 1 of 6

VP Freeze/Thaw in all Viewports in all Drawings

Anonymous
Not applicable

Would anybody be willing to modify the LISP attached so that it VP freezes/thaws layers in all viewports of each drawing?

 

We are transitioning to Sheet Set Manager and I've been surprised to find that nobody seems to want or need this functionality. I'm not sure how most people are managing their layers when using SSM, but we are still relying on VP Freeze in each layout sheet to decide what's visible. On the occasion that someone creates a new layer in an XREF file, or draws something on a layer that was previously empty, it shows up across all sheets and needs to be frozen. It's preferred to not handle this with global freezing, because many folks are in the habit of turning all layers on in Model Space to make sure nothing important is hiding.

 

This would be an amazing tool if someone is so inclined! Making this change myself has proven to be way beyond my ability.

 

Thanks!

0 Likes
2,778 Views
5 Replies
Replies (5)
Message 2 of 6

jrreid
Advocate
Advocate

I am assuming you are meaning for all drawings that you open a drawing that has multiple tabs with many view ports. If so, I am with you there and use this command all the time that I got from:

 

;;;CADALYST 07/06 Tip2129: LV.lsp Viewport Lock and Unlock (c) Theodorus Winata


I have created two buttons with Images. One with LV (Lock Viewports) and one UV (Unlock Viewports)

 

These are the command lines that are in the buttons:

---- To LOCK:

Command: (LOAD "C:/AUTODESK/TSS/LISP/VIEW-PORT-LOCK")
LV.LSP v1.0 (Copyright 2006 by "Theo Winata and You") loaded...!

Command: LV
Display locked [Yes/No] <Y>: Y

All Viewports Locked...!

 

----To UNLOCK:

Command: (LOAD "C:/AUTODESK/TSS/LISP/VIEW-PORT-LOCK")
LV.LSP v1.0 (Copyright 2006 by "Theo Winata and You") loaded...!

Command: LV
Display locked [Yes/No] <Y>: N

All Viewports Unlocked...!

 

It work flawlessly in any version of AutoCAD. 

 

Hope this helps and what you are looking for.

 

JRR.

0 Likes
Message 3 of 6

ronjonp
Advisor
Advisor

@Anonymous 

AFAIK in lisp, VP freeze is only available using command calls ( which does not work with ODBX ).

 

Maybe this simple solution can help you out:

 

(defun c:vpf nil
  (setvar 'cmdecho 0)
  (command "_.VPLAYER" "_Freeze" "*" "_All" "")
  (setvar 'cmdecho 1)
  (princ)
)
(defun c:vpt nil
  (setvar 'cmdecho 0)
  (command "_.VPLAYER" "_Thaw" "*" "_All" "")
  (setvar 'cmdecho 1)
  (princ)
)

 

Message 4 of 6

Sea-Haven
Mentor
Mentor

Pick a layer in Model, go to all layouts look for a viewport, may be more than 1, Vplayer freeze the layer, keep going until all done return to 1st layout/model. Just need some timeto put something together.

0 Likes
Message 5 of 6

jogonzalezpi1
Observer
Observer

it works, thank you very much 

0 Likes
Message 6 of 6

scot-65
Advisor
Advisor

@jogonzalezpi1 

 

Perhaps add these to your arsenal:

 

(defun c:FF     () (command "LayFrz" "Settings" "Block" "None" pause "")(princ))

(defun c:FFE    () (command "LayFrz" "Settings" "Block" "Entity" pause "")(princ))

(defun c:FFV    () (command "LayFrz" "Settings" "Viewports" "Vpfreeze" pause "")(princ))

 

The first one is plain Freeze.

The second one is for selecting objects inside blocks and xrefs.

The third one is for selecting objects inside viewports (viewport needs to be active).

 

Have you ever seen the number of layers inside a civil drawing file?

.sderdnuH :A

 


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

0 Likes