hello
using qcad 3.29.4.0 (3.29.4)
win 10
i am building some blocks with attributes.
when defining an attribute, i set its "invisible" property to "no".
then, i save the block to the library folder.
the attribute text is visible in the library browser and it is also visible when importing the item.
is it a normal behavior or a bug or missing feature ?
invisible block attribute and library item
Moderator: andrew
Forum rules
Always indicate your operating system and QCAD version.
Attach drawing files and screenshots.
Post one question per topic.
Always indicate your operating system and QCAD version.
Attach drawing files and screenshots.
Post one question per topic.
Re: invisible block attribute and library item
Hi,
It seems that it doesn't matter if an Attribute Definition entity is set to invisible or not.
When inserting a Block Reference based on a Block with an Attribute Definition then the resulting Block Attribute entity always has Invisible = No.
Still, visibility is affected by the Invisible property of the Block Attribute.
For that you need to opt to not select Block References together with Block Attributes in Application Preferences.
Block Attribute entities visibility is also not affected by the Block visibility unless the related application preference for Block References is set.
As far as I can reliably test it, visibility is not affected by Layer '0' compatibility mode depending on the blocks, it is of course affected by layers.
But something strange happened after swapping to another application and back ...
2 out of 8 test Block References no longer show their Attribute ...
As if repainting them is considering the original flag status.
Also: Attribute synchronization (UY) does copy over the isInvisible flag.
In my case all new Attribute Definitions are created with Invisible = Yes.
Meaning that they all will disappear once I synchronize Attributes ... Very odd default property setting.
And: Invisible = Yes is not retained on save/reload.
InsertBlock.js does not consider to set the isInvisible flag of the RAttributeEntity object ... See:
https://github.com/qcad/qcad/blob/maste ... #L184-L206
Nor does InsertBlockItem.js what does a similar action for library items.
https://github.com/qcad/qcad/blob/maste ... ockItem.js
If the flag is not handled then why is it a configurable entity property listed in the Property Editor?
One could consider this as a bug or it might be intended behavior ...
On the other hand, what serves an invisible Attribute ... You won't be able see nor select it.
It would only be listed in the Property Editor.
Regards,
CVH
Not "invisible" and thus visible ...
It seems that it doesn't matter if an Attribute Definition entity is set to invisible or not.
When inserting a Block Reference based on a Block with an Attribute Definition then the resulting Block Attribute entity always has Invisible = No.
Still, visibility is affected by the Invisible property of the Block Attribute.
For that you need to opt to not select Block References together with Block Attributes in Application Preferences.
Block Attribute entities visibility is also not affected by the Block visibility unless the related application preference for Block References is set.
As far as I can reliably test it, visibility is not affected by Layer '0' compatibility mode depending on the blocks, it is of course affected by layers.
But something strange happened after swapping to another application and back ...
2 out of 8 test Block References no longer show their Attribute ...
As if repainting them is considering the original flag status.
Also: Attribute synchronization (UY) does copy over the isInvisible flag.
In my case all new Attribute Definitions are created with Invisible = Yes.
Meaning that they all will disappear once I synchronize Attributes ... Very odd default property setting.
And: Invisible = Yes is not retained on save/reload.
InsertBlock.js does not consider to set the isInvisible flag of the RAttributeEntity object ... See:
https://github.com/qcad/qcad/blob/maste ... #L184-L206
Nor does InsertBlockItem.js what does a similar action for library items.
https://github.com/qcad/qcad/blob/maste ... ockItem.js
If the flag is not handled then why is it a configurable entity property listed in the Property Editor?
One could consider this as a bug or it might be intended behavior ...
On the other hand, what serves an invisible Attribute ... You won't be able see nor select it.
It would only be listed in the Property Editor.
Regards,
CVH
Last edited by CVH on Tue Mar 19, 2024 4:19 pm, edited 2 times in total.
Re: invisible block attribute and library item
Filed a related bug report on QCAD Bugtracker:
https://qcad.org/bugtracker/index.php?d ... sk_id=2553
Regards,
CVH
https://qcad.org/bugtracker/index.php?d ... sk_id=2553
Regards,
CVH