×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Find the Length of a text string in units.

Find the Length of a text string in units.

Find the Length of a text string in units.

(OP)
Is there a way to find the length of a Text string in untis not characters?. I am building a VBA program for AutoCAD.

RE: Find the Length of a text string in units.

The length of an existing text string in the drawing, or the length of a new text string that you know the characters of?

RE: Find the Length of a text string in units.

(OP)
Thanks for repling. It is the length of a text string The use will be putting in the drawing and it is unknown. Now having said that...I need to put have the text underlined. If I cannot get the length of he string, is there away to underline the text being entered. the code i am using is:

Set TextObj = ThisDrawing.ModelSpace.AddText(UCase(ViewText), PickPoint, TxtHeight)
    TextObj.color = 50
    TextObj.Alignment = acAlignmentBottomCenter
    TextObj.TextAlignmentPoint = PickPoint

RE: Find the Length of a text string in units.

The method GetBoundingBox should get you the height and width that about any AutoCAD object would occupy.

"Whether you think that you can, or that you can't, you are usually right "
.. Henry Ford

RE: Find the Length of a text string in units.

(OP)
Thank you...I will try that

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources