Every time you create a new AutoCAD drawing, you will see a default layer: Layer 0. This layer can’t be deleted.
Then when you define their properties such as color, line weight, etc, you will see ByLayer and ByBlock property. Most of you might already know what is ByLayer means. But do you also know the behavior of ByBlock properties?
In a nutshell, here is the explanation. If you’re confused, don’t worry. We will do an exercise to comprehend these later.
- Layer 0 is a default AutoCAD layer. When you want to create geometry for blocks, this is default layer for it. When you insert AutoCAD blocks, they will use active layer. Every objects in block that use Layer 0 will use the block layer properties.
- When you define object properties (color, line weight, etc) to ByLayer, all of it properties will use the same properties as it’s defined in the layers’ properties.
- When you create geometries in your AutoCAD block using ByBlock, then you can override it’s properties after the block has been placed.
- When you create geometries in your AutoCAD block other than ByLayer or ByBlock, then you can’t override them after your block has been placed.
Confused? Let’s create some example to comprehend this better.
Preparing objects with different properties
Open your AutoCAD, in a new file create two layers, you can give them any name. Set different color and lineweight so we can easily distinguish them later.
Now we will create 4 objects, in this example I use circle.
- First circle use layer 0, color: ByLayer, line weight: ByLayer
- Second circle use layer 0, color: ByBlock, line weight: ByBlock.
- Third circle use layer 0, color: red, line weight: 0.5 (we set this very bold so can be easier to see).
- The last one use layer 1, color: ByLayer, line weight: ByLayer.
Create 4 blocks from each of the circle.
Changing the blocks layer
Now select all those four, then change their layer to Layer 2. You can see block 1 and 2 use the properties, but block 3 and 4 still using it’s own properties.
Now override the color and line weight. Use color green, and line weight 2. You can see that the only block using the overridden properties is block no. 2!
Only block no.2 using the block properties, because we set it the geometry properties to by block.
Now freeze Layer1. We can see the block no. 4 disappeared, because the object in it was created on it.
Unfreeze Layer 1, so we can see block no. 4 back. Now freeze layer 2. Remember, we have moved all of the blocks to that layer. What happen? All of the blocks disappear, including block no. 4! This block also disappear because the block itself using Layer 2. When we freeze Layer 1, the block is actually still showing. But the geometry inside it will be disappeared. This will be clearer if we have another object with different layer in that block.
Unfreeze Layer 2, then freeze Layer 0. None of the blocks is disappear! Remember that we created geometry in block 1,2, and 3 using Layer0? They will ignore it and use the new properties.
If you want to understand more about this behavior, try to create more objects in your blocks. Set them to different properties. And play some more with their properties.
Now that you understand their differences, how do you think they will be useful when you create your blocks?
AWESOME! I have been kept in dark for ages about the difference between ByLayer and ByBlock properties, though I knew what Layer 0 does. After reading this article, I see the sunshine! It’s a very elaborate and explanatory article to enlighten anyone who is still in the dark about these layer properties. A very useful article indeed! Thanks a ton Edwin. Way to go!
When I create a block with layer overrides, (objects on Layer01, Layer02, Layer03. Nothing on Layer 0), and insert the block into a drawing where the active layer is for example, Layer04, The block is identified as being on Layer04 when selected. The objects within the block remain on their assigned layers. Usually not an issue but I’ve just completed an investigation as to why a block would not plot on a drawing. Turns out, while the block was created on Layer01, 02 and 03, it was inserted while Layer04 was the active layer. Layer04’s properties was set to not plot.
Is this just the way life is or is there a method in creating blocks or inserting them that will allow one to place the block and it not be associated with the active layer as described above.
Hi edwin. About the ByBlock, when can i use Byblock in drafting standards. I've always use Bylayer on using entities inside the block. But how about byblock? Please advise. Thanks in advance.
The behavior is still the same in AutoCAD 2010. The current layer will be saved when we save the files.
Unfortunately, I can't try it in AutoCAD 2009 since I don't use it anymore. Have you tried to install the AutoCAD 2009 updates? I see there are some bugs related to layers there. You can
download the update here.
Thanks for your quick repsonce….:-)
When i was working in AutoCAD 2006, if i save and close a drawing with a current layer "X".
If i open the same drawing the default layer will be "X".
But, it is not happening in AutoCAD2009, whenever i open the same drawing the default layer will turned to "0".
You can create or move objects to any other layer than 'layer 0'. But if you mean to change the default layer to other layer, no, you can't. You can't erase layer 0.
Why would you want to do that anyway? AutoCAD can create hundreds of layers for your needs.
can i able to change default "0" layer to some other layer present in the drawing.(i'm using autocad 2009)