Author Topic: How to convert from text format height to CAD text height?  (Read 2416 times)

0 Members and 1 Guest are viewing this topic.

cannorth

  • Guest
How to convert from text format height to CAD text height?
« on: August 01, 2013, 12:24:51 PM »
Hello,

  In an AutoCAD text box, you can place text formatting code as follows:

{\Fgothicb.ttf|c0;\H17.5;\C256;

  The H sets the height of the text.  Does anyone know the conversion factor between this H height and the regular AutoCAD height for a text entity?

Thanks,

cannorth

MexicanCustard

  • Swamp Rat
  • Posts: 705
Re: How to convert from text format height to CAD text height?
« Reply #1 on: August 01, 2013, 02:54:20 PM »
Are you trying to compare the H value embedded in the text, 17.5 in your example, with the actual Height property of the text object?

Edit:
I went back and played with an MText object just to verify.  I always get a factor as a "\H" value, ex. {\H1.625x}. 
So the "\H" value * mtext.TextHeight = height of the text contained in the brackets.
« Last Edit: August 01, 2013, 03:13:05 PM by MexicanCustard »
Revit 2019, AMEP 2019 64bit Win 10

cannorth

  • Guest
Re: How to convert from text format height to CAD text height?
« Reply #2 on: August 02, 2013, 10:06:18 AM »
Yes.

Micaletti

  • Guest
Re: How to convert from text format height to CAD text height?
« Reply #3 on: August 06, 2013, 03:06:42 PM »
I don't think this is what you are asking for but for annotive text:

TextHeight = 1.125 / Database.Cannoscale.PaperUnits
« Last Edit: August 06, 2013, 03:11:30 PM by Micaletti »

cannorth

  • Guest
Re: How to convert from text format height to CAD text height?
« Reply #4 on: August 06, 2013, 04:14:25 PM »
Thanks MexicanCustard.  \H = mtext.Textheight.

cannorth

fixo

  • Guest
Re: How to convert from text format height to CAD text height?
« Reply #5 on: August 06, 2013, 04:25:57 PM »
Me think, You could to to create this mtext directly, get the text height,
then erase it, just a thought