Block attributes insertion Windows

Block attributes insertion Windows

grobnik
Collaborator Collaborator
962 Views
5 Replies
Message 1 of 6

Block attributes insertion Windows

grobnik
Collaborator
Collaborator

Hi to everybody.

I fighting with a little issue, I'm managing a block with attributes by VBA, with insertion event I'm reading some external data in order to update the block's attributes, everything is working on this side.

But after the procedure is end the window with block attributes list appears for attributes again modification.

Question is there some SYSTEM Variable of some other option in order to avoid the attributes windows appears after a block insertion ?

 

Thank you.

0 Likes
Accepted solutions (1)
963 Views
5 Replies
Replies (5)
Message 2 of 6

norman.yuan
Mentor
Mentor
Accepted solution

I am not sure what "...managing a block with attributes by VBA..." mean, but it sounds that you do not want AutoCAD pops up attribute data input dialog box when user use AutoCAD's built-in command to insert a block reference.

 

Yes, there is a system variable to control it: "ATTDIA": when it is set to 0, the dialog box would not show up, instead, AutoCAD would show attribute entering prompts at command line, if another system variable "ATTREQ" is set to 1 (i.e. attribute values are required to be entered, either from the said dialog box, or from command line).

 

Judging by your previous post, it seems your "managing block..." means you have code to update the attributes after the said block is inserted via built-in command, so, in this case, the system variable you need is "ATTREQ" with its value set to 0 (that is, AutoCAD's built-in block inserting command would use attributes' default value (defined in block's AcadAttribute) as AcadAttributeReference' value, and does not wait user to enter attribute value.

 

Obviously, if the block reference is inserted by your code, you would not have this issue.

 

Norman Yuan

Drive CAD With Code

EESignature

0 Likes
Message 3 of 6

grobnik
Collaborator
Collaborator

@norman.yuan thank you Norman,

unfortunately the insertion it's not by VBA for several reasons.

However the answer is yes, I have a procedure for updating attributes, but not manage the insertion.

I'll try to set the variable you mentioned, I'll keep you informed.

 

Thank you.

0 Likes
Message 4 of 6

seabrahenrique
Advocate
Advocate

One point about that:

 

I also have a code to insert blocks in drawing and manage they attributes, and i realize if i use the instruction Thisdrawing.ModelSpace.InsertBlock.... the default attributes window  does not apper...

 

I don't know what kind of code u use to inser blocks... but we have the "automatic cancelation" of attributes window when we use Thisdrawing.ModelSpace.InsertBlock...differente if we use something like ThisDrawing.SendComand "-i"..... u know?

 

I hope my explanation was clear 😛

0 Likes
Message 5 of 6

grobnik
Collaborator
Collaborator

@seabrahenrique 

Thank you but I'm not inserting the block by code.

 

Thank you.

0 Likes
Message 6 of 6

grobnik
Collaborator
Collaborator

@norman.yuan Thank you for suggestion on ATTREQ sysvar, seems has also effect on checking by VBA if inserting block has attributes or not.

blkRef.HasAttributes = True

However it's working fine, I have to insert the variable change after attributes modification procedure and set again on.

 

Thank you bye.

0 Likes