.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Get text real height on screen

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
emiz
910 Views, 2 Replies

Get text real height on screen

Hi, I have align vertically some MText objects in a drawing. They have the Text Height property as 2.5 but on the screen they occupy a larger area (see attachement). How can I get or calculate the active height? I've tried the GeometricExtents but that doesn't help.

 

thank you

 

emiz

2 REPLIES 2
Message 2 of 3
norman.yuan
in reply to: emiz

I believe what you need is these 2 properties: MText.ActualWidth and MText.ActualHeight

 

MText's GeometricExtents varies depending on MText's Height/Width (Defined Width and Defined Height shown in properties window). If Width/Height is greater than the ActualWidth/ActualHeight (as your picture shows), then the GeometricExtents is the same as the Width/Height. However, MText's Width/Height can be set to less than ActualWidth/Height, or even be 0.0. In this case, the GeometricExtents wil be the same as ActualWidth/Height.

 

Message 3 of 3
emiz
in reply to: norman.yuan

Hi Norman,

 

thank you very much, your suggestion solved my problem.

 

emiz

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost