If you have ever wanted to delete a layer but come to find out that there are Civil 3D styles or some random object in the drawing, such as a block that uses it? Well, I have, and I use a generally well-known command called LAYDEL [Layer Delete]. Note that this is different than right-clicking on a layer name in the Layer Manager and clicking “Delete”.
It’s a very powerful command that rids the drawing of a possibly pesky layer but let’s see the effect it has on valid objects or styles that reference that layer. Let’s assume that we want to reassign the layer that an alignment uses, then get rid of the former layer. The one to remove will be C-ALIGN.
In this example, I can easily find what style owns this layer. However, in the case where you cannot do so, LAYDEL handles the issue for you. Simply type the command and you have the choice to select an object on the (un)desired layer name, or choose the layer from the dialog box.
When picking the layer with valid usage, you are prompted with a warning that states that the referenced blocks will be redefined. As well, all objects on that layer (lines, arcs, etc.) will be deleted. If you choose Yes to proceed, the affected objects and styles using that layer are either deleted or modified.
First, let’s look at that alignment style shown above and assess how it was affected. Right off-hand, you can see how it has been affected. No layer name exists to define certain components.
This can be remedied if you knew what style was affected by LAYDEL. Simply choose a different layer for these components to reside. Otherwise, these objects really do not exist on a layer. I’m pretty sure you wonder how that is possible. Let me tell you, it is. Let me explain/prove.
First, I’ll show the layer colors in use:
Even though we will change the color assignment for lines and curves in the components to BYLAYER, those parts will still show as green. Keep in mind that there are no green-assigned layers in my drawing.
However, as I look at my drawing, the alignment using that style, even new ones that I create, still show as green. To summarize; set to BYLAYER, no layers are green, and no layer assignment is set anymore (blank). This worries me and could possibly lead to issues down the line.
Will it print? Possibly, but in testing, it still showed as the same green assignment, no matter what plot style I changed the plot to (monochrome, greyscale, etc.). There is some disconnection that happened which removes a good amount of control to those components. By the way, it did not matter if I changed the alignment to a different layer. The components could not be turned off and always appeared green (yes, I did a REGEN and REGENALL).
So, styles aside, what happened to a block set to that layer? Well, I inserted my block that was on that layer and placed it in my drawing, zoomed in close enough to where I know I should see it. Guess what I saw. Nothing. So, issuing the SELECT command with the LAST object (picks up the block I inserted), all I get is the grip insert of the basepoint location.
Talk about “modified”. It will not show any geometry of the block as all parts were on the deleted layer. Spoiler alert: it will not show in the Block Editor either. So now, getting rid of a layer that was in use gave me a pretty much unusable style and a highly unusable block.
So, be careful what you wish for. You can rid your drawing of a layer, but make sure that it is a layer that will not cause a conflict or possible issues down the line.
About the Author
Follow on Linkedin More Content by Bryant Quinney