.NET

Reply
Member
emiz
Posts: 5
Registered: ‎07-07-2014
Message 1 of 3 (493 Views)
Accepted Solution

Get text real height on screen

493 Views, 2 Replies
07-31-2014 08:28 AM

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

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.

 

*Expert Elite*
norman.yuan
Posts: 1,064
Registered: ‎04-27-2009
Message 2 of 3 (472 Views)

Re: Get text real height on screen

07-31-2014 10:04 AM 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.

 

Member
emiz
Posts: 5
Registered: ‎07-07-2014
Message 3 of 3 (453 Views)

Re: Get text real height on screen

07-31-2014 12:50 PM in reply to: norman.yuan

Hi Norman,

 

thank you very much, your suggestion solved my problem.

 

emiz

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.