Skip to main content
Question

AutoCAD multilinetext width?

  • December 29, 2014
  • 3 replies
  • 28 views

Forum|alt.badge.img
Is there any way to determine the width (in coordinate units) of AutoCAD multiline text output?

 

 

I need to offset the text to the left for callout tags where the leader line leans to the left of the item they are describing (subtract width amount from x coordinate) - but I have yet to figure a way to extract the "rendered" width of the longest line to do so.
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

Forum|alt.badge.img
  • Author
  • December 31, 2014
If this is not possible - what is a good way to calculate the longest line (in number of characters) so I can just use that and mutiply by an average width to get close?

david_r
Celebrity
  • January 5, 2015
Hi,

 

 

have you looked at the StringLengthCalculator?

 

 

David

gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • January 7, 2015
SLC is in bytes, is it not?

 

 

I use boundingbox on the text attribute and extract its dimensions.

 

You need to (trial and error) adjust the value somewhat.

 

It is very dependant on the font type.

 

Look:

 

 

 

creates:

 

 

 

and zoomed in:

 

 

 

 

There is a tcl/TkCmd Font (wich has for instance Measure function) Wich is in pixels tough.