HOW TO FREEZE ALL LAYER EXCEPT PICKED IN VPORT?

HOW TO FREEZE ALL LAYER EXCEPT PICKED IN VPORT?

PRULS5370
Participant Participant
1,037 Views
6 Replies
Message 1 of 7

HOW TO FREEZE ALL LAYER EXCEPT PICKED IN VPORT?

PRULS5370
Participant
Participant

anyone have the lisp for it? can i see it? please

0 Likes
Accepted solutions (1)
1,038 Views
6 Replies
Replies (6)
Message 2 of 7

3wood
Advisor
Advisor

You can try LAYER.vlx.

VPfreeze all layers first in a viewport, then use command LPO to pick up the layer you need to show in the viewport.

0 Likes
Message 3 of 7

PRULS5370
Participant
Participant
thank u 🙂
Message 4 of 7

Kent1Cooper
Consultant
Consultant
Accepted solution

If you mean a single Layer of a picked object, this works in limited testing:

 

(defun C:VPFAES (/ esel); = ViewPort Freeze All layers Except that of Selected object
  (if (setq esel (entsel "\nSelect object on only Layer to be thawed in current Viewport: "))
    (command "_.vplayer"
      "_freeze" "*" "_current"
      "_thaw" (cdr (assoc 8 (entget (car esel)))) "_current"
      ""
    ); command
  ); if
  (princ)
); defun

 

If you want to select multiple objects to designate Layers to remain thawed, that can also be done:

(defun C:VPFAES (/ esel laystr); = ViewPort Freeze All layers Except those of Selected objects
  (while (setq esel (entsel "\nSelect object(s) on Layer(s) to be thawed in current Viewport: "))
    (setq laystr (strcat (cond (laystr) ("")) (cdr (assoc 8 (entget (car esel)))) ","))
  ); while
  (if laystr
    (command "_.vplayer" "_freeze" "*" "_current" "_thaw" laystr "_current" "")
  ); if
  (princ)
); defun
Kent Cooper, AIA
Message 5 of 7

PRULS5370
Participant
Participant

THANK U 🙂

 

Message 6 of 7

TomBeauford
Advisor
Advisor

Why not just use https://help.autodesk.com/view/ACD/2022/ENU/?guid=GUID-E24B9866-9538-43BF-A3DF-AA7E2341C624

LAYISO (Command)

Hides or locks all layers except those of the selected objects.
64bit AutoCAD Map & Civil 3D 2023
Architecture Engineering & Construction Collection
2023
Windows 10 Dell i7-12850HX 2.1 Ghz 12GB NVIDIA RTX A3000 12GB Graphics Adapter
0 Likes
Message 7 of 7

Kent1Cooper
Consultant
Consultant

@TomBeauford wrote:

Why not just use LAYISO (Command)

Hides or locks all layers except those of the selected objects.

... if the Settings are correct for that, but the default Settings seem to be.  I was not aware that LAYISO has a per-Viewport-VPFreeze option now [I think it has not always had that], rather than just turning Off other Layers [which is still an optional Setting].

Kent Cooper, AIA
0 Likes