Block Attributes & Block references

If you are having problems with QCAD, post here. Please report bugs through our Bug Tracker instead.

Always attach your original DXF or DWG file and mentions your QCAD version and the platform you are on.

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files and screenshots.

Post one question per topic.

Post Reply
CVH
Premier Member
Posts: 3480
Joined: Wed Sep 27, 2017 4:17 pm

Block Attributes & Block references

Post by CVH » Wed Feb 21, 2024 1:08 pm

Is it intended behavior that Block Attributes are created on the layer of the Attribute Definition while inserting a Block instance on another layer?
I would expect them to be created on the current active layer. # EDIT # To avoid, see lower

Example file included, Layer '0' is set to best compatibility (See App.Prefs)
When inserting to Target 1 & 2 the preview has two colors but after inserting the color of the Attributes changes.
For the rest the details and issues are addressed in the file.

Best compatibility:
"Entities in blocks on layer 0 take on attributes and visibility of block reference."
For the color attribute that seems to match but I have troubles with understanding visibility ... :oops:

Still if one can explain it with 'best compatibility' then turn this feature off and another duality pops up.

# EDIT # To avoid, see lower
Block+Attributes_test.dxf
(103.7 KiB) Downloaded 39 times

Related topic:
https://www.qcad.org/rsforum/viewtopic. ... =15#p43852
and lower.

Regards,
CVH
Last edited by CVH on Thu Feb 22, 2024 10:48 am, edited 2 times in total.

CVH
Premier Member
Posts: 3480
Joined: Wed Sep 27, 2017 4:17 pm

Re: Block Attributes & Block references

Post by CVH » Wed Feb 21, 2024 4:36 pm

Partially explained by Andrew:
https://www.qcad.org/rsforum/viewtopic. ... 862#p43861

Block Attributes are not created on the current active layer, but on the layer dictated by the Attribute Definition in the Block definition.
Only the Block Reference is created on the current active layer.

Regards,
CVH

CVH
Premier Member
Posts: 3480
Joined: Wed Sep 27, 2017 4:17 pm

Re: Block Attributes & Block references

Post by CVH » Thu Feb 22, 2024 7:29 am

New insights, new file.

Block+Attributes_test2.dxf
To be viewed with best compatibility on (See App.Prefs.)
(109.55 KiB) Downloaded 40 times

Can't explain (4) and (6&7).
And if I assume that it is correct then something else must be incorrect.
Rules should apply to all.

Regards,
CVH

CVH
Premier Member
Posts: 3480
Joined: Wed Sep 27, 2017 4:17 pm

Re: Block Attributes & Block references

Post by CVH » Thu Feb 22, 2024 10:23 am

With the second file we can also experiment what happens when turning off rule A.
Not A or not using best compatibility (See App.Prefs.)

All from the 'Original' Block and all Block References of the 'Copy' are displayed in layer '0' color (Black but here White on Black).
All these are also visible/hidden when toggling layer '0' visibility.
Only the Block Attributes based on the 'Copy' remains visible because only these are on their dedicated layer.
When hiding only Target 1 then only the Block references on Target 1 turn invisible.
When hiding only Target 2 then only the Block references on Target 2 turn invisible.

Thus with not using best compatibility I can't detect dualities.

But there are some questions that pop up.
Focusing on the Block Reference based on 'Copy' and associated Block Attributes inserted on Target 1:
- Selecting both Block Attributes the Property Editors displays *VARIES* for the layer.
- Selecting the Block Reference and Attributes together the Property Editors display 'Target 1' in green for the layer.
... Although the Block Reference is in the color of layer '0' and the block attributes have their respective colors being orange and cyan.

We now come to the 'By Layer' property ...
Everything is set 'By Layer': The Block entities, the Attribute Definitions, the Block References and all associated Block Attributes.
The Block References inserted on Layer '0' and the Block Attributes of those based on the 'Copy' reflect their layer color.
Block References based on 'Original' or 'Copy' on Target 1 or on Target 2 are all Black.
... Although these Block References are 'By Layer' and the layers are green or magenta.

I then must conclude that Block Reference entities exploiting 'By Layer' don't inherit the color attribute of the layer they live on.
Setting the Block References color 'By Block' does not change that.
The sole method is setting only the Block entities property to 'By Block' by editing the Block definition.
Setting and the Block entities color property, and the Block References color property to 'By Block' results in ... Black again.

- - - - - - - -

Bottom line:
What was I thinking. :roll:
I never understood this and intensive testing has not yielded any new insight, it has only created more confusion.
Perhaps endless digging trough QCAD resources may shed some light.

End of story.
CVH

Post Reply

Return to “QCAD Troubleshooting and Problems”