Hiding/Unlocking Layers (including Block)

Hiding/Unlocking Layers (including Block)

k005
Advisor Advisor
739 Views
7 Replies
Message 1 of 8

Hiding/Unlocking Layers (including Block)

k005
Advisor
Advisor

Hello friends;

 

We can hide the layer with the LAYOFF command. However, in case of Block, this does not work. I use the LAYFRZ command instead.


What I want to do is to use layoff if the selected object layer is block and not layfrz.,..


example command name: defun C:LayhidView . If it is closed, it can be opened with a single command. If it is open, close it...


Thanks in advance to the helpful friend.

 

0 Likes
740 Views
7 Replies
Replies (7)
Message 2 of 8

paullimapa
Mentor
Mentor

LAYOFF just like LAYFRZ should be able to turn off objects inside blocks.

Make sure you select Settings > Block selection > Block is selected

paullimapa_0-1716074140315.png

 


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 3 of 8

k005
Advisor
Advisor

I asked for a routine that turns it on/off with the same command. Thank you.

0 Likes
Message 4 of 8

paullimapa
Mentor
Mentor

From what I'm understanding by reading your OP, LayOff & LayFrz both do let you pick an object even inside a Block to turn off or freeze. But if you want to pick an object to turn back on inside a Block that would not be possible since you cannot see an object that is turned off or frozen. Please clarify your request.


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 5 of 8

k005
Advisor
Advisor

No . We will not select anything to open. It will open all closed layers or frozen ones... the choice will be only when closing.

0 Likes
Message 6 of 8

paullimapa
Mentor
Mentor

Download my free LayerApps that includes two new commands called DDLyrOn and DDLyrTh that will show all Off or Frozen layers in a dialog box for you to select from to turn On or Thaw


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
Message 7 of 8

Kent1Cooper
Consultant
Consultant

@k005 wrote:

I asked for a routine that turns it on/off with the same command. Thank you.


To thaw and turn on a Layer that's frozen or off, I have a routine that does it for top-level objects but not nested ones [LayerThawOnSelect.lsp, >here<].  But I don't understand how you would use a single command to either do that or turn the Layer off.  Thawing/turning-on requires turning everything on temporarily so that you can pick something on a Layer you want on.  But surely if your intent is sometimes to turn off the Layer of something, you don't need everything turned on -- the Layer you want to turn off is already available for the picking.

 

So you invoke the command you're looking for, and everything comes on [because it must if you're going for turning something on that's currently off] and then you pick something.  How do you imagine the command would be able to know whether that's on a Layer you want on or off?

Kent Cooper, AIA
Message 8 of 8

k005
Advisor
Advisor

I think this way:


Open: If there is any closed or frozen layer in the layer list, open it. Otherwise, do not take any action and exit...


Closing: If the selected layer is a block, freeze it. If not, close the layer.

 

 

 

0 Likes