Jump to content
mstb

Find the length of a text

Recommended Posts

ronjonp
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

Share this post


Link to post
Share on other sites
dlanorh
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

 

Share this post


Link to post
Share on other sites
Lee Mac
1 hour ago, dlanorh said:

That doesn't solve this request Lee

 

How so?

Share this post


Link to post
Share on other sites
dlanorh
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.

Share this post


Link to post
Share on other sites
BIGAL

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

Share this post


Link to post
Share on other sites
Roy_043

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.

Share this post


Link to post
Share on other sites
BIGAL

Roy try 111.123 v's 444.123 and change fonts style mono Arial Isocp etc I don't think it will work.

 

 

Edited by BIGAL

Share this post


Link to post
Share on other sites
Roy_043

I have assumed a fixed text style.

Share this post


Link to post
Share on other sites
Lee Mac

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

Share this post


Link to post
Share on other sites
Roy_043

(/= "fixed text style" "fixed width text style")

Share this post


Link to post
Share on other sites
Lee Mac
9 hours ago, Roy_043 said:

(/= "fixed text style" "fixed width text style")

 

What did you mean then?

Share this post


Link to post
Share on other sites
Roy_043

As BIGAL suggests, a textstyle can be changed, which would mess up the vertical alignment of the texts.

Share this post


Link to post
Share on other sites
BIGAL

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.

 

 

Share this post


Link to post
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
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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...