Cannot freeze turn off or change color of layers

Issue:

You noticed that you cannot turn off, freeze, or change the color of layers that contain the characters "#", "@", or "~" in the new Layer Properties Manager used in AutoCAD® 2009.

Solution:

Solution

You cannot turn off, freeze or change the color of a layer if the layer name contains the characters "#", "@", or "~" because these characters are wildcards in the new Layer Properties Manager.

To resolve this problem, use one of the following workarounds:

  • Set the value of the LAYERDLGMODE variable to 0.
    The Layer Properties Manager from previous versions of AutoCAD will be used instead, and these characters will not be considered wildcards.

Or

  • On the command line, enter VBASTMT and then paste the following code on the command line:

    For Each myLayer In ThisDrawing.Layers: myLayer.Name = Replace(myLayer.Name, "@", "rpl"): myLayer.Name = Replace(myLayer.Name, "#","rpl"): myLayer.Name = Replace(myLayer.Name, "~","rpl"): next

This code iterates through the Layers database and replaces the characters "@", "#", and "~" with the string “rpl”, in the layer name.

If you want, you can use a different replacement string by replacing all instances of "rpl" in the above code with the desired string or character before pasting the code on the command line.

Products:

AutoCAD

Versions:

2009

Discuss