Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski 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
Joined
Feb 26, 2004
Messages
8
Location
US
Is there a way to find the length of a Text string in untis not characters?. I am building a VBA program for AutoCAD.
 
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
 
Thank you...I will try that
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top