Objects in CAD have several basic attributes such as color, linetype, line weight and so on, these attributes control the display effect and printing effect of graphics. So setting attributes of objects properly can make graphics more clear, more importantly, we can get the best printing effect. When setting the color, linetype and line weight of the objects, we can see the two options of Byblock and Bylayer in the list. However, even people with some CAD knowledge could be confused by them, not mention how confusing they can be to CAD newbies.
A brief explanation of these two concepts:
Byblock: inherit the properties from the properties of the block referred or inserted.
Normally, we only do this Byblock setting to graphic objects that we’re going to define. After the graphic objects are defined and set to Byblock, we can modify the properties of the block and the properties of the objects will change according to the block. But if the properties of the graphic objects have been set to Byblock without being defined as a block, then the graphic objects will use the default properties: the color is written, the line weight is 0, the linetype is a full line. If the properties of graphic objects within the block haven’t been set to Byblock, then modifying those blocks will make their properties remain. For example, set the color of a circle as red and define this circle as a block, then change the circle to green, the circle will remain red.
Bylayer: inherit the properties from the layer the block is inserted in.
Objects are Bylayer by default. Layer is a useful tool to manage graphics and graphic objects in the same category will be put on one layer, so using the properties to control graphic objects is more convenient. Common practices are: Set layers according to needs for drawing and printing, set the color, linetype, line weight, to plot or not and put the graphics at proper layers when drawing.
If the graphics are simple and not put into different layers or you want to have some differences in display effect and printing effect in the same layer, we can set very object respectively the color, linetype and line weight.
Bylayer is simple, the properties of graphic objects will inherit the properties of the layer they’re on no matter the objects are separate or in the block.
We can clearly see the layer where separate objects are on. The layer where objects in the block are on is related to both the layer when we define graphics as blocks and the layer when we insert block reference. If the graphic objects are on layer 0, after being defined as a block, the graphics objects will be on the layer where the block is inserted. If the graphic objects are not on layer 0, after being defined as a block, the graphic objects remain on the original layer no matter which block it’s inserted on. It’s easy to understand this: just create two new layers, set layer 1 as red, layer 2 as green, draw a circle on both of them, use the default property Bylayer. Select those two circles to create a block. Insert this block on three layers and we can see that the circle on layer 1 is still red, circle on layer 0 has the same color as the current layer.
If the properties of objects within the block are set to Byblock and the properties of a block is set to Bylayer, then the properties of objects in the block will change with the inserted layers, we could directly modify the block properties to control the properties of objects within the block. If the properties of objects in the block is set to bylayer or other fixed properties, then changing the block properties won’t affect objects in the block.