December 19, 2012

Too Many Layers…

As a Consulting Services Provider for Autodesk Products, we often receive requests for tips from our customers making the transition to current versions of software. 
 

As a Civil 3D Application Specialist, one of the questions I hear the most is “How do I get rid of all the extra Layers in the Civil 3D template?” If you’re a current Civil 3D user, you may understand where this question comes from. If you’re new to the program, here’s a bit of an explanation.
 

Civil 3D uses a drawing template file (.DWT) to create all of the necessary layers, styles, settings and so forth in the same way the AutoCAD does. With Civil 3D drawings, these template files also include Object Styles, Label Styles, and numerous additional styles and settings associated with the dynamic functionality of the program. Along with these styles come the Layers that the objects are placed on. The Civil 3D 2013 out-of-box template contains 201 pre-defined Layers that automatically show up in a new drawing file.
 

In most cases, the recommendation would be to simply delete the layers you don’t need. Unfortunately, Civil 3D (and AutoCAD) doesn’t quite work that way.  Civil 3D will automatically prevent users from deleting any styles or layers that are being used and/or referenced by other objects in the drawing file. In this case, the default Styles included in the template are referencing the Layers created in the drawing, thus preventing them from being deleted.
 

So what can we do?
 

Well, there’s a handy little command that’s been around for quite a while now called LAYDEL, short for Layer Delete. The LAYDEL command will allow users to override the automatic block that the program has on deleting layers assigned to objects. When you use the LAYDEL command, you are allowed to delete all layers except for Layer 0, which is pre-programmed into the drawing and has its own special properties.
 

The added benefit to using the LAYDEL command is that it does not delete or remove any of the pre-defined Styles from the Civil 3D template; only the pre-defined Layers that fill the Layer Properties Manager. The Civil 3D styles remain in the drawing file and save their pre-defined layer designation. The layer itself is only created if and when it is needed (when an object assigned to it is created in the drawing). If the command is never used, the layer never gets added to the drawing file.
 

Here’s a quick example of how it works:
 

When the initial blank Civil 3D 2013 drawing file is opened (from the default _AutoCAD Civil 3D (Imperial) NCS.dwt file) it contains 201 Layers.

Figure 1: Out-Of-Box Template with 201 Layers
These layers are created automatically, based on the pre-defined Styles and Settings that assign Layers to Civil 3D Objects. A list of these layers can be found in the Edit Drawing Settings Dialog box, under the Object Layers tab.

Figure 2: Civil 3d Object Layers Tab
Because the Objects are assigned to these specific layers by the template file, Civil 3D will try to prevent these layers from being deleted.

Using the LAYDEL command, along with the NAME option, we can override this action so that all layers except for Layer 0 can be deleted from the drawing. When the Delete Layers dialog appears, use the Shift+left-click method to select all layers on the list and click OK to delete them from the drawing.


Figure 3: Delete Layers Dialog
Figure 4: Layer Delete Warning
A warning also appears asking you to confirm that you want to delete the layers, and telling you that all objects referencing these layers will also be deleted.

Once the process is complete, the Layer Properties Manager will be empty, except for Layer 0. From that point on, additional layers can be added as needed by the user. If a Civil 3D object is created, the Object Layer assigned to it will be automatically added as well.

So if you’re starting out with Civil 3D, or if you’re just looking for a way to get rid of some unwanted Layers that are cluttering your Layer Properties Manager, try the LAYDEL command.


Matt Miyamoto, P.E.
Ideate AEC Application Specialist

Matt is a licensed Civil Engineer in the state of Hawaii. Matt obtained a BS in Mechanical Engineering from the University of Hawaii at Manoa, and has 7 years of private sector design experience which he applies in his role as an application specialist with Ideate, Inc. His project experience includes residential and commercial site development, private and public sewer, water and drainage systems, harbors improvements, and roadway improvements. While in Hawaii, Matt was involved in multidisciplinary projects for City and County agencies, State Departments, the Army COE and private developers. @MattM_PE

Get it. Know it. Use it.