Understanding Layer 0, ByLayer and ByBlock in LusoCAD
Sempre que cria um novo desenho, verá uma layer predefined Layer0. You'll soon realise that you can't delete it.
Then, when setting its properties, such as colour, line thickness, etc., you'll see properties ByLayer and ByBlock. Many of you will already know what ByLayer. But you also know how the ByBlock?
- A Layer0 is a predefined LusoCAD layer. You can create geometry in your blocks on it. When you insert these blocks, they will use the active layer. When you move this block to a different layer, the objects inside it will use it and ignore the active layer. Layer0.
- When you define the properties of an object (colour, line thickness, etc.) as ByLayer, all its properties will use the same properties defined in the layer's properties.
- When you create geometries in your block using ByBlockYou can then override its properties after the block has been placed.
- When you create geometries in your block with something other than ByLayer or ByBlockthen you won't be able to replace these properties once the block has been placed.
Example of Layer 0, ByLayer and ByBlock
- Open a new file and create two layers; you can give them any name. Define different colours and line thicknesses so we can easily distinguish them later.

- Now we're going to create 4 objects; in this example, we've created circles:
- First circle: use layer0, colour: ByLayer, line thickness: ByLayer
- Second circle: use layer0, colour: ByBlock, line thickness: ByBlock.
- Third circle: use layer0, colour: red, line thickness: 0.5 (we set this value high to make it easier to see).
- Fourth circle: use layer1, colour: ByLayer, line thickness: ByLayer.
- Create 4 blocks, one from each of the circles. Now select these four and then change their layer to Layer2. You can see that blocks 1 and 2 use the properties of the Layer2But blocks 3 and 4 continue to use their own properties.

- Now replace the colour and line thickness. Let's apply the colour green and a line thickness of 2. You can see that the only block to use the replaced properties is block no. 2!
Only block 2 is using the block properties, because we've defined the geometry properties as ByBlock.
Now freeze the Layer1. We can see that block #4 has disappeared, because the object inside it was created in the Layer1.
Defrost the Layer1to return to block 4. Now freeze the Layer2. Remember that we moved all the blocks to this layer.
What happened?
All the blocks have disappeared, including block no. 4! This block also disappears because the block itself is using Layer2. When we freeze Layer1, The block remains visible, but the geometry inside it disappears. This will be clearer if we have another object with a different layer inside that block.
Defrost the Layer2 and then freeze the Layer0. None of the blocks disappear! Remember that we created the geometry in blocks 1, 2 and 3 using the Layer0? They will ignore it and use the new properties.
If you want to understand this behaviour better, try creating more objects in your blocks. Assign different properties to them.