[solved] Blocks and Layers

Use this forum for all posts and questions about the free QCAD Community Edition version 3

Moderator: andrew

Post Reply
yeti01
Junior Member
Posts: 14
Joined: Sat Mar 24, 2018 11:31 am

[solved] Blocks and Layers

Post by yeti01 » Wed Dec 29, 2021 4:27 pm

Following this description does not fit to the actual behaviour:

https://qcad.org/en/tutorial-layers-blo ... attributes

Example:
  • Drawing consists of 2 layers ("0"=white, "1"=orange).
  • The 4 lines are drawn on layer "1". Color chosen is "By Layer". So they are shown in orange.
  • The symbol in the middle is a block from a library, drawn on layer "1". Color chosen is "By Layer". But it is white.
I would have expected that the block is also shown in orange.

The example file is added below.

Screenshot at 2021-12-29 15-08-12.png
Screenshot at 2021-12-29 15-08-12.png (17.92 KiB) Viewed 4980 times
blocks_and_layers.dxf
(28.73 KiB) Downloaded 294 times
Last edited by yeti01 on Fri Dec 31, 2021 3:38 pm, edited 1 time in total.

User avatar
Husky
Moderator/Drawing Help/Testing
Posts: 4931
Joined: Wed May 11, 2011 9:25 am
Location: USA

Re: Blocks and Layers

Post by Husky » Wed Dec 29, 2021 7:43 pm

yeti01 wrote:
Wed Dec 29, 2021 4:27 pm
Example:
  • Drawing consists of 2 layers ("0"=white, "1"=orange).
True
yeti01 wrote:
Wed Dec 29, 2021 4:27 pm
  • The 4 lines are drawn on layer "1". Color chosen is "By Layer". So they are shown in orange.
True
yeti01 wrote:
Wed Dec 29, 2021 4:27 pm
  • The symbol in the middle is a block from a library, drawn on layer "1". Color chosen is "By Layer". But it is white.
I would have expected that the block is also shown in orange.
Nope. The entities in the block are drawn on layer 0 and inserted on layer 1. If your QCAD Layer compatibility is set to "Layer 0 behaves differently" then every entity in your block drawn on layer 0 will adapt the color from the layer in your drawing on which it is inserted.

Test it: Insert the blocks in your drawing on layer 1 and then on layer 0 ... :wink:
Work smart, not hard: QCad Pro
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."

yeti01
Junior Member
Posts: 14
Joined: Sat Mar 24, 2018 11:31 am

Re: Blocks and Layers

Post by yeti01 » Thu Dec 30, 2021 12:55 pm

Hi Husky, thanks for your help.

Your suggestion works for symbols drawn on layer 0. Great. But unfortunately not for symbols drawn on other layers.

Try this:
  • Create a layer 1 (blue). Draw something (e.g. a rectangle)
  • On layer 1 insert a symbol that is drawn on layer 0 (top left). It is shown in blue.
  • On layer 1 insert a symbol that is drawn on layer xyz (bottom right). It is always shown in the color of layer xyz.
How can I change the color/attributes of such symbols (w/o changing the symbol itself)?

Screenshot at 2021-12-30 11-31-58.png
Screenshot at 2021-12-30 11-31-58.png (19.79 KiB) Viewed 4897 times
blocks_and_layers2.dxf
(26.7 KiB) Downloaded 290 times

User avatar
Husky
Moderator/Drawing Help/Testing
Posts: 4931
Joined: Wed May 11, 2011 9:25 am
Location: USA

Re: Blocks and Layers

Post by Husky » Thu Dec 30, 2021 11:50 pm

yeti01 wrote:
Thu Dec 30, 2021 12:55 pm
How can I change the color/attributes of such symbols (w/o changing the symbol itself)?
Use different layer within the block,
or
use custom colors for single entities in your block,
or
explode the block after inserting it,
or
switch your Layer Compatibility to "Layer 0 behaves like a regular Iayer (QCAD)",

etc. etc. etc.

This example circle is one block inserted on different layer. You may play with it to see what you can do to control the attributes in a block.

Husky-2021.12.30-05.png
Husky-2021.12.30-05.png (16.71 KiB) Viewed 4863 times
blocks_and_layers2_mod.dxf
(101.78 KiB) Downloaded 296 times
Work smart, not hard: QCad Pro
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."

yeti01
Junior Member
Posts: 14
Joined: Sat Mar 24, 2018 11:31 am

Re: Blocks and Layers

Post by yeti01 » Fri Dec 31, 2021 2:57 pm

After reading https://qcad.org/en/tutorial-layers-blo ... attributes again and again and trying to reproduce the example in the article, I noticed 2 important points:
  1. Only entities of a block that have set color/attributes to "By Block" change their color/attributes according to the layer of the drawing the block is placed on.
  2. What was confusing me, is the description below. In my opinion the 3 red marked "2" should be replaced by "1".
So if you want to create a symbol library, and you want the symbols to inherit the color/attributes of the layer of your drawing, be sure that the entities of the blocks (symbols) have color/attributes set to "By Block".

2021-12-31_14-25.png
2021-12-31_14-25.png (142.75 KiB) Viewed 4824 times

Post Reply

Return to “QCAD Community Edition”