invisible block attribute and library item

Use this forum to ask questions about how to do things in QCAD.

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files and screenshots.

Post one question per topic.

Post Reply
ssm2017
Newbie Member
Posts: 8
Joined: Sat Nov 25, 2023 8:26 pm

invisible block attribute and library item

Post by ssm2017 » Tue Mar 19, 2024 11:28 am

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 ?

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

Re: invisible block attribute and library item

Post by CVH » Tue Mar 19, 2024 1:02 pm

Hi,
ssm2017 wrote:
Tue Mar 19, 2024 11:28 am
i set its "invisible" property to "no".
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 ... :shock:
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.

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

Re: invisible block attribute and library item

Post by CVH » Tue Mar 19, 2024 4:15 pm

Filed a related bug report on QCAD Bugtracker:
https://qcad.org/bugtracker/index.php?d ... sk_id=2553

Regards,
CVH

Post Reply

Return to “QCAD 'How Do I' Questions”