Optimize all mtext occurences

Optimize all mtext occurences

Anonymous
Not applicable
2,571 Views
11 Replies
Message 1 of 12

Optimize all mtext occurences

Anonymous
Not applicable

This is my first time posting.  I'm only a few years into this discipline, so pardon me if there's an easy answer to this.

 

I'm curious if there's a way to optimize all occurences of mtext within a drawing.  (like when you double click and optimize a column in excel, windows explorer, or in the layer properties manager for that matter)

 

I had a drawing come to me with a bunch of surface contour labels that were mtext.  They masked a bunch of the contour line because they were not optimized.  I isolated them and looked for a way to possibly do this within the properties, but couldn't find anything.

 

Any tips?  Would this be something to create a lisp routine for?  Thanks!

0 Likes
Accepted solutions (2)
2,572 Views
11 Replies
Replies (11)
Message 2 of 12

ChicagoLooper
Mentor
Mentor

Are you talking about mtext  contour labels with a wide mask? If you are and the mask is wider than necessary and covers up too much of the contour underneath, then you can kinda reduce the mask width globally. Select one of the labels, right click and choose Select Similar from the shortcut menu. Go to Properties Palette and in Text section, decrease the value of Paper Defined Width. If it's grayed-out, then change the Columns settings to None. You'll need to guessimate the width that works in your drawing. It's not a perfect solution, but it'll still work by trial and error.

 

Decrease the value for 'Paper Defined width.'Decrease the value for 'Paper Defined width.' 

If you're talking about contour labels for a Surface however, then that requires a different procedure where you have to go to the Label Style Composer (Toolspace>settings tab>surface>label styles>contour>select your label style then right click and edit.

Chicagolooper

EESignature

Message 3 of 12

tcorey
Mentor
Mentor

"Optimize" is not a recognized AutoCAD concept. Can you explain?

 

If all you need to do is add a background mask to those labels, select them all, then use Properties window to set Background Mask. You have to hit that little icon at the right end of the input box.



Tim Corey
MicroCAD Training and Consulting, Inc.
Redding, CA
Autodesk Platinum Reseller

New knowledge is the most valuable commodity on earth. -- Kurt Vonnegut
0 Likes
Message 4 of 12

AllenJessup
Mentor
Mentor

I understand what is being asked but don't have a solution (or maybe do). I've gotten drawing like the OP where the width of the Mtext greatly exceeds the width needed to encompass the text. So if the Mtext has a background mask. The mask till cover entities that don't need to be masked. The Mtext width can be change one at a time while editing by double clicking the double arrows on the (usually) right side of the box [<>]. You can change the width of multiple Mtexts in the Properties Dialog. But using Properties to change them only works if they will all be the same width.

There is no way I know of to set the width based on the actual text size other than one at a time. Maybe someone else will or will have a lisp.

Allen Jessup
CAD Manager - Designer
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

0 Likes
Message 5 of 12

AllenJessup
Mentor
Mentor
Accepted solution

This will work in some cases depending on the justification of the Mtext. Select all the Mtext and change the defined widths to 0 in the properties dialog. This will shrink all the background masks to fit the Mtext.

The problem is that if the Mtext has a center justification. The text may move to the center of the original box. So if all your text is left or right justified in the proper place. It should work.

Allen Jessup
CAD Manager - Designer
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

0 Likes
Message 6 of 12

Anonymous
Not applicable

Yep, that is precisely it.  This is what I'm asking about.  I'm going to play around some more with the zero width idea you mentioned.

I posted a little clip (should've done that in the first place, my bad).  Just to bring clarify for others, I'm talking about where you double click those arrows I circled, and by doing so, it optimizes the width of the mtext box.

0 Likes
Message 7 of 12

Hidden_Brain
Advisor
Advisor
Accepted solution
0 Likes
Message 8 of 12

Anonymous
Not applicable

Aah, I bet that'll do it.  Just by reading it, it sounds like a solution!  I'll have to play around with it more when I have some time.

0 Likes
Message 9 of 12

copper.chadwick
Autodesk Support
Autodesk Support

@Anonymous,

Welcome to the forums! I see your question is to find a methodology to optimize the background masking to multiple MTEXT objects in a drawing. Did you find a methodology that worked well for your purposes. I saw that @AllenJessup@tcorey@Hidden_Brain, and @ChicagoLooper all gave some great solutions and or workflows, did one best help? If so, please hit the Accept as Solution button if a post fully solves the issue or answers the question.​ Thank you for your participation, your accepting a solution adds value to the post for the community as a whole, and helps other members find answers to their issues.


Copper Chadwick
Designated Support Specialist
0 Likes
Message 10 of 12

Anonymous
Not applicable

Sorry, the reply from Hidden_Brain posted should be marked as the solution.

 

I clicked a link in my email just to get to the thread.  Well it ended up marking yours as the solution.  I don't recall right now how the third one got marked as a solution.

0 Likes
Message 11 of 12

Anonymous
Not applicable

Finally had some time to tinker around a bit more.  This did just what I needed.  Hopefully that's the case in future instances too.

 

Just to reiterate, select all Mtext that I need to modify, then change "defined width" in the properties to 0.

0 Likes
Message 12 of 12

AllenJessup
Mentor
Mentor

@Anonymous wrote:

Just to reiterate, select all Mtext that I need to modify, then change "defined width" in the properties to 0.


Yes. Just watch out for position changes on non-left justified text. If that's a problem try the .dll @Jeff_M provided in the link that @Hidden_Brain posted.

Allen Jessup
CAD Manager - Designer
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

0 Likes