Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Self Adjusting Text Box / .lsp file

4 REPLIES 4
Reply
Message 1 of 5
rees.charles
486 Views, 4 Replies

Self Adjusting Text Box / .lsp file

I have a question to anyone who can answer it.

Is there anyway (command or .lsp file) where a text box can adjust itself to the extent of the text within?

As a trainee who usually has to clean up drawings, I find it frustrating that some people don't adjust the box within the MTEDIT command. (I have used a screenshot for an example.)

 

I would be really grateful if anyone knew a way to get them to adjust automatically once you've come out of it or by selecting them all and using a command.

 

Thank you in advance for any response!

Labels (1)
4 REPLIES 4
Message 2 of 5
dmfrazier
in reply to: rees.charles

I'm not certain about what you're asking for, but it looks like you're unfamiliar (perhaps) with the concept of a block of MText that has its width property set to 0 (zero). This is actually what you'd do if you want the "text box" to "adjust itself to the extent of the text within."

 

I suppose if you'd prefer to have a bunch of MText objects to have the same defined width, then you could simply select them and use Properties to set the width.

 

Apologies if I've misunderstood.

Message 3 of 5
rees.charles
in reply to: dmfrazier

Hi dmfrazier,

 

I believe I half know what you're going on about, could you please explain how you can set the width property to 0? (if this is what you are getting at.)

If so in my properties menu, the defined width section is greyed out and I am unable to change it.

 

In my experience, if I have found this problem in the past, I have simply double clicked the slider to adjust the extents of the text box (attached if you are unsure about what I mean). Recently I have found numerous drawings with boxes so big that I have to scroll out to even find the slider to adjust it to the size of the text.

 

I'll try to reword the above, is there a command or .lsp file which can be created to automatically adjust the text box to the extent of the contents within so that it will save time instead of selecting each mtext/leader and adjusting it manually.

 

I apologies if this is long winded , I don't have to exact AutoCAD terminology to explain it at the moment. 

 

Thank you in advance.

 

 

Message 4 of 5
dmfrazier
in reply to: rees.charles

"...in my properties menu, the defined width section is greyed out and I am unable to change it."

 

I suspect this is because the MText is defined with Columns set to "Dynamic" or "Static". To set the Width to 0, first set the Columns property to "None" (or No Columns). You may be able to do this with multiple MText objects at the same time.

Message 5 of 5
dmfrazier
in reply to: rees.charles

"...which can be created to automatically adjust the text box to the extent of the contents within"

 

The difficulty with this is that determining "the extent of the contents within" is not necessarily obvious. For example, some MText width is determined expressly by the Width property, so that text that runs longer than that width value will wrap to a new line, increasing the box height, while some MText width may be largely (or entirely) based on the presence of carriage returns.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Forma Design Contest


Autodesk Design & Make Report