Make text / Mtext update to copy another text / Mtext

Ali-pk
Contributor

Make text / Mtext update to copy another text / Mtext

Ali-pk
Contributor
Contributor

Good morning, hope all are doing well. Any way to have text / mtext blocks reference a master text / mtext block, so when I update the master block with whatever text I want, all other secondary blocks are updated to match that.

 

To give more details to my particular case, I have these text blocks with various numbers, and would like to change everything all at once, instead of manually changing each block. 

Alipk_0-1697211848597.png

 

 

Thanks in advance!

0 Likes
Reply
666 Views
10 Replies
Replies (10)

RSomppi
Advisor
Advisor

Your post is hard to understand as your blocks look fine in the image. Can you explain what your difficulty is?

 

I'm going to guess here and say that you have attributes in your block and you need them to be text.

0 Likes

clindner
Advocate
Advocate

Hi, @Ali-pk ,

 

If the text shown in these blocks are attributes, you might explore the ATTOUT and ATTIN Express tools commands. In a nutshell, it allows you to export attributes to a tab-delimited (CSV) file, make changes to the file, then re-import the new values updating the attributes.

 

 


Please use the Accept as Solution or Kudo buttons when appropriate

Chris Lindner
CAD Technology Consultant @ onebuttoncad.com
AUGI Board of Directors

0 Likes

Ali-pk
Contributor
Contributor

I want to change all 5's in the photo to any number or letter. I only want to change one of the 5's and let all other text blocks referenced to the master "5" change to whatever number or letter I choose.

0 Likes

Valentin_CAD
Mentor
Mentor

@Ali-pk ,

 


@Ali-pk wrote:

... Any way to have text / mtext blocks reference a master text / mtext block, so when I update the master block with whatever text I want, all other secondary blocks are updated to match that.

 


Read these links and see if it helps:



Select the "Mark as Solution" if my post solves your issue or answers your question.

Seleccione "Marcar como solución" si mi publicación resuelve o responde a su pregunta.


Emilio Valentin

0 Likes

clindner
Advocate
Advocate

A simple find/replace (via FIND) may suffice. You can be selective about what pieces of text get updated (instead of the entire drawing).

 

Or explore the use of FIELDS. Establish one of the '5's' as your main text. For the other pieces of text, edit the other text to be fields that reference ("point to") the contents of the "main text". 

 

In the image below, the 'main text' is the one at the top. The add'l pieces of text are fields (hence the gray background). They will all update (after a REGEN) to reflect the contents of the main text. 

clindner_0-1697216084913.png

 


Please use the Accept as Solution or Kudo buttons when appropriate

Chris Lindner
CAD Technology Consultant @ onebuttoncad.com
AUGI Board of Directors

0 Likes

Ali-pk
Contributor
Contributor

Here is a better explanation of what I need. I have added  basic "text" to my autocad file. All of these "text" read the same. I want to change the top "text" to any number/word/letter/etc, and then the bottom four "text" need to automatically update to read the same as the top "text".

 

Alipk_1-1697216789597.png

 

0 Likes

clindner
Advocate
Advocate

@Ali-pk wrote:

Here is a better explanation of what I need. I have added  basic "text" to my autocad file. All of these "text" read the same. I want to change the top "text" to any number/word/letter/etc, and then the bottom four "text" need to automatically update to read the same as the top "text".

 

Alipk_1-1697216789597.png

 


I think FIELDs will do exactly what you want. See my previous post.

 

In your example, the bottom four pieces of text would each contain a field that "point to" the contents of the top text. When it changes, a REGEN (or PLOT, or OPEN) will update the other four pieces.  

 

You can control how/when the fields get updated via OPTIONS.

clindner_1-1697217385189.png

 

 

 


Please use the Accept as Solution or Kudo buttons when appropriate

Chris Lindner
CAD Technology Consultant @ onebuttoncad.com
AUGI Board of Directors

0 Likes

Valentin_CAD
Mentor
Mentor

@Ali-pk ,

 

Type FIELD at the command line and select object type (Content), don't forget to Regen when updating.

 

ValentinWSP_0-1697218161849.png

 



Select the "Mark as Solution" if my post solves your issue or answers your question.

Seleccione "Marcar como solución" si mi publicación resuelve o responde a su pregunta.


Emilio Valentin

0 Likes

Kent1Cooper
Consultant
Consultant

Define it as a Block containing a piece of Text, instead of using just Text.  Edit that Block, and all insertions of it will change likewise.

 

Or define it as a Block with an Attribute.  Select all of them, and in Properties you can change that Attribute's value in all of them at once.

 

Or as Text, just select all of them, and in Properties you can change the text content of all of them at once.

 

If you need something that will find them all for you, rather than requiring you to select them, an AutLisp routine could be written that would find all Text objects that match the one you pick to change [including, if you like, limiting selection to the same Layer and/or Style and/or height, etc.], whether or not they are visible on-screen at the time, and change all of them to the same new value.

 

EDIT:  The Field approach is interesting, but it has the drawback that you always need to know which one is the source object for the content, in order to change the correct one and have all the Field-based-content objects follow suit.

Kent Cooper, AIA

RSomppi
Advisor
Advisor

Keep it simple. Edit the block and change out the attribute for the top number to text. You can then change the top number to anything and all the others will change.

0 Likes