Announcements

Starting in December, we will archive content from the community that is 10 years and older. This FAQ provides more information.

Change the attribute's positon in all the copies of a block within a drawing

Anonymous

Change the attribute's positon in all the copies of a block within a drawing

Anonymous
Not applicable

Is there a way to create an attribute in a block, but to make the attribute in such a manner, so when you change the symbols in the attribute for a particular block, it doesn't change throughout all the copies of the block in the drawing, but when you change the position of the attribute in this particular block, the position of this attribute applies to all of the copies of the block in the drawing.

 

Let me put this in example and pictures:

 

(1) In the attached file (IAsk.dwg), you can see three circles with text on them — every circle is the same block repeated three times in the drawing and the text is an attribute to the block.IAsk.1.JPG

 

(2) I double click the Val.1 to change the value of the attribute in the first block, from Val.1 to Val.1.1 for example.

IAsk.2.JPG

 

(3) The result is exactly what I am looking for — the change of the attribute applies only to the current block.

IAsk.3.JPG

 

(4) If I want to move the attribute, there is also no problem — the attribute moves for the current block without any displacement of this attribute in other copies of the block in the drawing.IAsk.4.JPG

 

(5) The actual problem occurs, when I want to move the attribute inside the block editor and it doesn't move throughout any of the instances of the block in the drawing — I want it, because in an actual drawing, I need to move the attribute of a certain block, that is already replicated several tens of times and I don't want to move every attribute for its own, but I rather believe, there is a way to do this automatically.

 

   (5.1) Within the block editor I move the position of the attribute.IAsk.5.1.JPG

 

   (5.2) What I want: to have the position of the attribute in the drawing applied over every copy of the block in the drawingIAsk.5.2.JPG

 

   (5.3) What I get: the new position is not applied anywhere in the drawings and according to my so far knowledge, I have to move the attribute manually at every instance of this block — this certainly I will try to avoid.IAsk.3.JPG

 

I had a couple of tries with the block editor's Parameters and Actions, but no success so far.

 

If you know a way to achieve the outcome from (5.2), I kindly ask you to share it here.

 

I hope my question is properly explained and a helpful colleague with a solution will soon spot my question.

 

Thanks in advance.

 

Edit: Due to a reason I am unaware of, the attached file is missing form my original post, but now I am adding it in this edit.

0 Likes
Reply
Accepted solutions (3)
6,063 Views
6 Replies
Replies (6)

Moshe-A
Mentor
Mentor
Accepted solution

@Anonymous  hi,

 

The behavior you see is absolutely correct, that's exactly how it works cause...an insert (a block reference) is an instance of the block definition (outcome of BLOCK command) that is: when you defines a block you specifies a block name, insertion point, XYZ scale factors and rotation angle - yes?!

now to show it on your drawing you insert it with INSERT command - yes?!  (that's the block reference)

in a drawing to one named block definition you can have many inserts - yes?!

attributes in block creates a special case of block reference where the attributes are part of the insert.  that is: if you modify the geometry part of the block definition? on exit bedit (with save) the changes are automatically (if regenauto is on) populate to all inserts but if you modify the attributes? the changes are not populate and the reason for that is another long story. to also update the attributes? you have to synchronize them with ATTSYNC command (or BATTMAN command). anyhow the attribute value will not be modify and that's relates to the long story 😀

 

Now, if you drag a specific attribute (say move it out left) than you relocate the same attribute in bedit (say out right) the result (after attsync) will be the cumulative move which may not be the position you thought 😀 

 

cheers,

Moshe

    

 

 

 

Anonymous
Not applicable

@Moshe-A, thank you for your reply. Some of it, however I have failed to understand. Attsync-ing the drawing after I change the position of the attribute in the block and save it, actually does relocate the attribute in all the copies of the block, but unfortunately, they lose their values. So I cannot really solve my problem like that.

0 Likes

Alfred.NESWADBA
Consultant
Consultant
Accepted solution

Hi,

 

ATTSYNC updates all properties of a modified attribute (like position, text-style, ...) ... but you don't lose values.

 

The only chance to lose values is that you gave the attribute a different name/tag, because then ATTSYNC does not find the old name of an attribute in the modified block definition, which means for ATTSYNC "attribute XXX does not exist any more" and removes it.

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2024
------------------------------------------------------------------------------------

(not an Autodesk consultant)

Anonymous
Not applicable

Hi @Alfred.NESWADBA 

 

At fist, I did not understand the meaning of "The only chance to lose values is that you gave the attribute a different name/tag", because It doesn't really become clear what name of the tag has to appropriate in order for the value not to disappear, but eventually I have created new block and an attribute with the same name on both of them, and all eventually managed to happen.

 

In this order of thought, I give a thumbs up on both of the answers and accept them as a solution.

 

Thank you for the effort to answer me. I wish you, guys, all the best.

0 Likes

Alfred.NESWADBA
Consultant
Consultant
Accepted solution

Hi,

 

>> I did not understand the meaning of "The only chance to lose

>> values is that you gave the attribute a different name/tag",

As sample:

You first have a block table with an attribute PRICE, this block is inserted multiple times and each of the blocks have then the attribute PRICE filled with different values.

 

Situation 1:

You want to have the attribute PRICE on a different position (inside the table geometry) or a different text size ... so you start block-editor and change the size and position of the attribute definition PRICE.

After you have modified the block definition you close the block-editor, run command _ATTSYNC for that block and all block-insertions will show the modified attribute-values, with the new height and new position.

 

Situation 2:

You have the block-editor open, double click the attribute definition and change the tag from "PRICE" to "PRICE_RETAIL", then you close the block-editor and again you run _ATTSYNC ... now the block-insertions have to be updated, an attribute PRICE does not exist any more (remember, there the values were entered), and a new attribute PRICE_RETAIL was introduced.

So the old attribute is removed (the values are lost) and the new attribute was added. AutoCAD does not know that values you had in an attribute "PRICE" should now be transferred to a new attribute "PRICE_RETAIL" ... and that's why values inside attributes can be lost.

 

I hope that makes it more clear now!

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2024
------------------------------------------------------------------------------------

(not an Autodesk consultant)

Anonymous
Not applicable

Yep. That now makes things clear. This was also very important for my problem and I have also accepted it as a solution, since this comment completes the answer to my question fully.

0 Likes