Community
Civil 3D Customization
Welcome to Autodesk’s AutoCAD Civil 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Civil 3D Customization topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Feature Request: Button that turns on & thaws all layers at once

8 REPLIES 8
SOLVED
Reply
Message 1 of 9
johnthoreson
413 Views, 8 Replies

Feature Request: Button that turns on & thaws all layers at once

I wish there was a button on the Layers II menu that would turn on & thaw all the layers (except the current one, and not toss up a warning message) at the same time.  When it's pressed a second time, the previous layer state is restored.  

 

This would be very helpful for trying to find an object or layer and/or see what you have in the drawing.

 

I do this now by going opening up the Layer Manager, then selecting all the layers, and turning them on and thawing them, then click the Layer Previous button in the Layers menu to finish up.  A single button to do this all would be great!

8 REPLIES 8
Message 2 of 9

It sounds like using the LayIso command will get you half way there and the layuniso command will get you the rest of the way. Two buttons and you have to select an object with the layer you want isolated.

Civil Reminders
http://blog.civil3dreminders.com/
http://www.CivilReminders.com/
Alumni
Message 3 of 9
jrauch
in reply to: johnthoreson

You might also want to check out LayerWalk

 

http://help.autodesk.com/view/CIV3D/2015/ENU/?guid=GUID-5682CC98-D131-43B0-9E46-3A403E6FC087

-John J. Rauch, P.E.
Message 4 of 9
tyronebk
in reply to: johnthoreson

This is a routine I use that does something similar:

;;; this routine turns on, thaws and unlocks all layers
;;; does not thaw layers in viewports

(defun layall( s / x )
  (setvar 'cmdecho 0)
  (setq x "LayAllUndo")
  (setq proceed 0)
  (if (layerstate-has x) 
    (progn 
      (initget "Yes No")
      (setq result (getkword "Layer state \"LayAllUndo\" already exists. Update definition? [Yes/No] <Y>: "))
      (if (not (= result "No"))
        (progn
          (layerstate-delete x)
          (layerstate-save x nil nil)
        )
      )
    )
    (layerstate-save x nil nil)
  )
  (command "-LAYER" "UNLOCK" s "THAW" s "ON" s "")
  (prompt "\nAll layers have been turned on, thawed and unlocked.")
  (setvar 'cmdecho 1)
  (princ)
)
(defun c:LayAll( / x )
  (layall "*")
)

(defun c:LayAllNoX( / x )
  (layall "~*|*")
)

(defun c:LayAllUndo( / x )
  (setvar 'cmdecho 0)
  (setq x "LayAllUndo")
  (if (layerstate-has x) 
    (progn
      (layerstate-restore x)
      (layerstate-delete x)
      (prompt "\nLayer state restored to last \"LayAllUndo\" definition.")
    )
    (prompt "\nNo layer state \"LayAllUndo\" definition found.")
  )
  (setvar 'cmdecho 1)
  (princ)
)
(princ)

 Feel free to adapt as required.

Message 5 of 9

I think this approach does the opposite of what I'm trying to accomplish, but I appreciate the input.

 

Using Layiso is good at turning off/freezing everything but the layers I select and Layuniso restores the previous layer state.  

 

But I want to turn on/thaw all the layers at once so I can see everything in the drawing, then restore the previous layer state.

 

 

Message 6 of 9
johnthoreson
in reply to: jrauch

Thanks for the reference to Layerwalk.  It's a tool I'm unfamiliar with and now can see how I'll use this when cleaning up a drawing. 

 

It looks like it's better for isolating and finding objects on layers rather than showing me everything in the drawing at once.

Message 7 of 9
johnthoreson
in reply to: tyronebk

This looks really interesting and could be the tool I'm looking for.  I'll check it out.  Thanks!

Message 8 of 9

Then you may want to check out laythw and layon and then the LayerP you already know about. The first two are found on the Layers dropdown on the Home Tab of the Ribbon, top left buttons. 

Civil Reminders
http://blog.civil3dreminders.com/
http://www.CivilReminders.com/
Alumni
Message 9 of 9

Those are basically what I was looking for.  Thanks!!!  Very helpful!

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

Post to forums  

Rail Community


Autodesk Design & Make Report