Change attribute of blocks keeping rotations and positions of the attributes

Change attribute of blocks keeping rotations and positions of the attributes

Anonymous
Not applicable
12,981 Views
19 Replies
Message 1 of 20

Change attribute of blocks keeping rotations and positions of the attributes

Anonymous
Not applicable

How to change attribute of multiple instances of a block while keeping the rotation and position of the attribute?

 

Example: 

 

I have multiple instances of a block (too many to edit them one by one, also with use of properties palette) with a certain attribute and I want to change the text height.

 

The blocks have different rotations and the attributes also.

 

If I edit the block and change the attribute's text height and then synchronize the specific attribute changes, like rotation and position, also change.

 

Is there a way to only change, in this example, the text height and keeping the rotation and position of the attribute?

 

Kind regards,

 

Bart

0 Likes
Accepted solutions (3)
12,982 Views
19 Replies
Replies (19)
Message 2 of 20

pendean
Community Legend
Community Legend
Did you manually rotate the atributes that flip back? ATTSYNC is doing what you tell it to do, sync (aka completely match up) all the other blocks/attributes to the one you picked as the control.
0 Likes
Message 3 of 20

imadHabash
Mentor
Mentor

Hi,

 

Try BATTMAN ..

Imad Habash

EESignature

0 Likes
Message 4 of 20

braudpat
Mentor
Mentor

 

Hello stblb

 

If I understand well :

- You edit Block and especially Attributes , you save the new block definition then Exit ...

- Then BATTMAN to synchronize old blocks previously inserted !

and you loose specific rotation, specific position, specific height on some attributes !?

 

I am right ???

 

Regards, Patrice (I am not an Autodesk Advisor)

 

 

 

Patrice ( Supporting Troops ) - Autodesk Expert Elite
If you are happy with my answer please mark "Accept as Solution" and if very happy please give me a Kudos (Felicitations) - Thanks

Patrice BRAUD

EESignature


0 Likes
Message 5 of 20

Anonymous
Not applicable

@pendean wrote:
Did you manually rotate the atributes that flip back? ATTSYNC is doing what you tell it to do, sync (aka completely match up) all the other blocks/attributes to the one you picked as the control.

Yes I manually rotated the attribute of some instances of the block, and yes i know that's the purpose of attsync, my question is what other solution exists?

0 Likes
Message 6 of 20

Anonymous
Not applicable

battman also does a sync, so manual changes of an attribute are reset, so not the solution I'm looking for, I need Super-attribute-man i think 🙂

0 Likes
Message 7 of 20

pendean
Community Legend
Community Legend
Might be time to ask in the LISP customization forum http://forums.autodesk.com/t5/autocad-customization/ct-p/AutoCADTopic1
0 Likes
Message 8 of 20

braudpat
Mentor
Mentor

 

Hello from France

 

Please try this French Routine SYN from Patrick_35 (A French Developper)

I have tried (I am not a delopper) to do minimum translation but a few French words/options remain ... Sorry !

 

This SYN routine does about the same thing as BATTMAN but let you keep in place some properties of attributes !

You have to select which properties you want to keep ...

 

Let me know if this routine runs correctly on your US/English AutoCAD !?

 

Regards, Patrice (I am not an Autodesk Advisor)

 

 

Patrice ( Supporting Troops ) - Autodesk Expert Elite
If you are happy with my answer please mark "Accept as Solution" and if very happy please give me a Kudos (Felicitations) - Thanks

Patrice BRAUD

EESignature


Message 9 of 20

braudpat
Mentor
Mentor

 

Hello pendean

 

Thanks for the Kudos !

 

Have you tested the SYN routine on your US/English ACAD ?

If YES, SYN does the job !?

 

Regards, Patrice (I am not an Autodesk Advisor)

 

Patrice ( Supporting Troops ) - Autodesk Expert Elite
If you are happy with my answer please mark "Accept as Solution" and if very happy please give me a Kudos (Felicitations) - Thanks

Patrice BRAUD

EESignature


0 Likes
Message 10 of 20

Anonymous
Not applicable

Hello from Belgium 🙂

 

I tried that LISP routine, the rotation (angle) keeps the same but it does move altough I marked the "position" checkbox.

 

 

0 Likes
Message 11 of 20

braudpat
Mentor
Mentor

 

Hello

 

It works for me ! ... Tested on a standard block with 2 attributes moved and with a new height and a specific rotation !

 

Attributes which have been moved, remain at their new position !

 

I know a minor bug, if you have forced color on some attributes they are resetted to the original color

But I don't force color on attributes ...

 

Maybe you can share with us a part of your DWG with a few blocks and some attributes moved ?

 

Regards, Patrice (I am not an Autodesk Advisor) 

 

Patrice ( Supporting Troops ) - Autodesk Expert Elite
If you are happy with my answer please mark "Accept as Solution" and if very happy please give me a Kudos (Felicitations) - Thanks

Patrice BRAUD

EESignature


0 Likes
Message 12 of 20

Anonymous
Not applicable

As extra test I started a new drawing, I made a new block  with an attribute, copied the block a few times, some with atttribute rotated and moved and one with attribute moved, rotated and changed text height.

 

If I than edit the block and sync it with that lisp attribute sync instead of with "attsync", the same happens as I would do that with "attsync" because of an error I saw now:

 

Command: SYN

ATTSYNC complete pour le bloc TEST att.
Erreur : Automation Error. Object was erased

 

 

0 Likes
Message 13 of 20

braudpat
Mentor
Mentor
Accepted solution

 

Hello

 

I have retested with my French MAP 2014 + SP2 with a block made of one rectangle and one standard attribute : no problem !

 

Please could you test with my DWG and my SYN routine ... Look at the ZIP file !?

 

Regards, Patrice (I am not an Autodesk Advisor)

 

Patrice ( Supporting Troops ) - Autodesk Expert Elite
If you are happy with my answer please mark "Accept as Solution" and if very happy please give me a Kudos (Felicitations) - Thanks

Patrice BRAUD

EESignature


Message 14 of 20

Anonymous
Not applicable
Accepted solution

With your drawing it works fine.

 

I found the reason of that other error, I also changed the attribute tag name, because there was also situation where a colleague wanted to change the original tag name but I guess the LISP looks for the original tag name.

 

So if I keep the original tag name and change only the height when editing block, and than sync with LISP the manually adjusted attributes keep their different kind of values, but only with my drawing I have the problem that the atts move a little for some reason.

 

 

I found another LISP routine that works for me (except if I want to change the tag name): http://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/attribute-modifier-lisp/m-p/4701539#M...

 

I will use this othe LISP if I want to change rotation, height, color or layer.

LISP for changing tag name I haven't found yet.

 

Thx for your help

0 Likes
Message 15 of 20

braudpat
Mentor
Mentor

 

Hello

 

OK if your are happy, I am happy !

 

Are you looking for a routine to copy an attribute value to an other attribute (for example a NEW one just created with BEDIT and then BATTMAN or ATTSYNC or SYN routine or equivalent routine) ? 

 

Or a routine to RENAME only the attribute Tag ?

 

Regards, Patrice (I am not an Autodesk Advisor)

 

Patrice ( Supporting Troops ) - Autodesk Expert Elite
If you are happy with my answer please mark "Accept as Solution" and if very happy please give me a Kudos (Felicitations) - Thanks

Patrice BRAUD

EESignature


0 Likes
Message 16 of 20

Anonymous
Not applicable

Yes, there was a rare (maybe one time?) situation where a colleague needed to rename the attribute "tag name" and "prompt".

 

U also have a solution for this?

 

Regards,

 

Bart

0 Likes
Message 17 of 20

braudpat
Mentor
Mentor
Accepted solution

 

Hello Bart

 

Yes an other nice routine (RET) from Patrick_35 - I like RET, SYN, etc ...

 

The RET routine lets you rename the attribute tag completely or partially (Search and replace) ...

 

I hope this one will solve your problem !?

 

Regards, Patrice (I am not an Autodesk Advisor)

 

Patrice ( Supporting Troops ) - Autodesk Expert Elite
If you are happy with my answer please mark "Accept as Solution" and if very happy please give me a Kudos (Felicitations) - Thanks

Patrice BRAUD

EESignature


Message 18 of 20

Anonymous
Not applicable

Nice, maybe I can add a function to rename the prompt if it works similar, someone plz make an all-in-one attribute changer LISP routine that would be even better 🙂

 

Maybe I can give it a try 🙂

0 Likes
Message 19 of 20

Anonymous
Not applicable

The answer supplied seems to work fine - for a single block.

 

However hopefully some of the folks that answered and give a bit more of an explanation if there is one.

 

Here's the deal...

 

I have a light symbol block.  I set up an attribute so that it's rotation doesn't change as was talked about.  If I insert that block and rotate it, it works perfect.  However, I work on larger scale projects where we will have a unit block for an apartment that block will be repeated throughout the building at various angles.  So I drop into the unit block the correctly rotating attributed light fixture symbol and rotate the unit.  Nothing.  Doesn't rotate.  Every fixture on every floor needs to be adjusted back to horizontal reading text.  Huge time waste.  And... if someone wants to change a block (yes these are architects - everything gets changed) then do a BATTMAN and once again you have to go through and re-rotate all of them again..

 

I tried setting up the text style as anno with it set to horizontal to the VP but that doesn't help either.  Seems that it only applies to MText, etc not in a block, but doesn't apply to anything in a block.

 

Any other ideas??

0 Likes
Message 20 of 20

pendean
Community Legend
Community Legend
0 Likes