You’ve certainly heard the principle that you should use layers to give objects properties. When you create a layer, you give that layer a
- Color
- Linetype
- Lineweight
- Transparancy
- Plotstyle
Also, for 3D drawings, you can apply a material to a layer with the MATERIALATTACH layer.
But it is all too easy to make an exception for an object and change it so that a property is not according to its layer. For example, you can select an object, and choose any color for it by going to the Home tab, Properties panel, Object Color drop-down list.
When you decide that this is a mistake (made by someone else, of course), you can easily return objects to the properties assigned by their layer with the SETBYLAYER command.
Here are the prompts:
Command: SETBYLAYER
Current active settings: Color Linetype Lineweight Transparency Material
Select objects or [Settings]: 1 found
Select objects or [Settings]:
Change ByBlock to ByLayer? [Yes/No] <Yes>: Y
Include blocks? [Yes/No] <Yes>:
1 object modified.
I must admit that this command has more prompts than I would like. You might want to create a custom command that automates the block-related prompts for you.
If you choose the Settings option, you get this dialog box.

Note: The Plot Style option is available only if you are using named plot styles.
In this dialog box, you can specify which of the properties you want to include when you set an object’s properties to its layer properties.
Do you use this command? Do you have a way of streamlining it? Leave a comment to share with others!
Sign up to get the AutoCAD Tips Newsletter so you won’t miss any new tips!
Facebook Page
We have a .NET application that runs in the background checking for whenever the active layer is changed, when the active layer is changed all the active settings (color, weight, type, etc) are automatically set back to ByLayer.
[...] I have a tip that goes into the SETBYLAYER options more in detail–”Maintain standards by returning objects to ByLayer settings.” [...]