Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Find the Length of a text string in units.

Status
Not open for further replies.

Thawlro

Computer
Feb 26, 2004
8
Is there a way to find the length of a Text string in untis not characters?. I am building a VBA program for AutoCAD.
 
Replies continue below

Recommended for you

The length of an existing text string in the drawing, or the length of a new text string that you know the characters of?
 
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
 
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor