Posted by
LordOfBikes on
Jul 20, 2022; 9:06am
URL: https://forum.librecad.org/Insert-blocks-in-layer-problem-tp5720266p5721905.html
I recommend to follow these steps for better understanding of blocks:
- start a new drawing, it has only layer 0
- from library browser insert misc/screw
- check layer list, layers _strech_lr_2 and auxiliary are added from the block
- create new layer 1, with different color or line type
- activate layer 1 and insert misc/screw from library browser again
- see differences in the inserted blocks and what happens when you toggle layer visibility
You will recognize, that what is layer 0 in the block editor becomes the layer in the drawing, to which the block was added. All other layers of the block are preserved.
When you add a block to a drawing it is done with an INSERT entity. That means, a reference to the block is added to the active layer.
Thus when you toggle layer 0 or 1 visibility, the whole block disappears, because the INSERT entity becomes invisible.
What is layer 0 in the block is translated to the INSERT's layer and it inherits properties, when they are set to BY_BLOCK or BY_LAYER in the block editor.
But when you toggle layers _strech_lr_2 or auxiliary visibility, parts of both added blocks disappear, from layer 0 block and layer 1 block.
When block properties are set different from BY_BLOCK or BY_LAYER, they are not modified on insert. This is possible, but does not make much sense, especially for libraries.
So this is the intended implementation of blocks in LibreCAD.
The libraries from library browser are presumably mostly community contributions and I can't say if they are all following this implementation or if they possibly cause issues.
We can check this, when you tell us which library and part is concerned or when you post a test case dxf file.
investing less than half an hour into Search function can save hours or days of waiting for a solution