Incorrect Visibility Property

Incorrect Visibility Property

dbrblg
Collaborator Collaborator
1,036 Views
1 Reply
Message 1 of 2

Incorrect Visibility Property

dbrblg
Collaborator
Collaborator

I have a problem with the visibility property of a block attribute with VBA returning the incorrect state.

 

Firstly, if I open the block and look at the properties for the attribute in question - 'X2TERM04' we can see that it is indeed invisible:

Attribute Property.png

When you examine this properties 'Invisible' property you can see that it returns the correct state:

Invisible.png

 

However when you look at the 'Visible' property for the same attribute, you can see an incorrect state:

Visible.png

 

It returns True for both 'Visible' and 'Invisible' states...

 

Is this a known issue?

0 Likes
1,037 Views
1 Reply
Reply (1)
Message 2 of 2

norman.yuan
Mentor
Mentor

Well, you can say it is an "known" issue, or "by design", if only you are familia with AutoCAD programming: Attribute (AcadAttributeReference) is a class derived from AcadEntity. Visibile is a property of AcadEntity, thus also a property of AcadAttributeReference. However, Visible property is not meant for CAD user to use (that is why you do not see it in the Property Window). That is, CAD user does not have a way to turn Visible property on or off; but it can be toggled via code (such as in your VBA code). So, you can hide and show entities use your code. Just to remeber turning Visible on and off programmatically could confuse user greatly, so do not abuse it.

 

On the other hand, "Invisible" is property only available to AcadAttributeReference and is meant to be accessed to by CAD user. It is there for giving more options when attributes is presented in the drawing.

Norman Yuan

Drive CAD With Code

EESignature

0 Likes