Jump to content

Find the length of a text


mstb

Recommended Posts

37 minutes ago, Lee Mac said:

There is no need to create temporary text objects, nor guess the width using the number of characters and a factor, just use the textbox AutoLISP function.

Hahahaha .. I was wondering when someone would bring that up :)

  • Funny 1
Link to comment
Share on other sites

  • Replies 32
  • Created
  • Last Reply

Top Posters In This Topic

  • mstb

    10

  • BIGAL

    6

  • dlanorh

    6

  • Roy_043

    4

1 hour ago, Lee Mac said:

There is no need to create temporary text objects, nor guess the width using the number of characters and a factor, just use the textbox AutoLISP function.

 

That doesn't solve this request Lee

 

Quote

I actually want to transfer the elevation codes that are in the drawing  so that the insertion point falls on the dot point

Of course, this way I have to use the right font, which is a problem (I mean, the font that gives a space to all the characters)

excuse me for may bad english

 

Link to comment
Share on other sites

31 minutes ago, Lee Mac said:

 

How so?

 

As far as I can make out he wants either the insertion point of the text to be the decimal point, or to move the text so that the decimal point of the elevation text is over the node. No drawiing so otherwise clueless.

Link to comment
Share on other sites

Think of it this way. using mono text its possible. Working out the width of each character may work. Compare 1 & 4

 

image.png.81b52ab8bdfe756b396bf8d528117928.png

Edited by BIGAL
Link to comment
Share on other sites

Getting the decimal point to match the insertion point is probably difficult. But aligning a column of texts so their decimal points are exactly below each other is possible with the textbox function. Get the width of "123.45" and of ".45" and use the difference to move the text.

Link to comment
Share on other sites

Assuming a fixed width text style is not necessary - consider a text object with left justification and content "123.45", calculate the width of "123." using the textbox function and translate the object by this width to the left.

Edited by Lee Mac
Link to comment
Share on other sites

To get even more technical the decimal point moves depending on the font, some are at bottom, others say at mid height. Our surveyors have to use correct font for title work.

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...