The TextNoteType class is where a property to find the size of a Text type would ideally be found. But it is not.
However, all hope is not lost.
It is important to remember (and sometimes easy to forget), that there is also a huge set of parameters in the Revit API known as Built In Parameters. Many of these parameters work in the internal Revit code and not in the API, but many (such as TEXT_SIZE) are also perfectly usable in the API.
Usage:
TextNote textNote = doc.GetElement(uidoc.Selection.PickObject(ObjectType.Element).ElementId) as TextNote;
TextNoteType textNoteType = doc.GetElement(textNote.GetTypeId()) as TextNoteType;
Parameter textSizeParam = textNoteType.get_Parameter(BuiltInParameter.TEXT_SIZE);
TaskDialog.Show("Text Size", textSizeParam.AsDouble().ToString());





How about text that is bold? I don’t mean the parameter for text type for bold, but when text has been made bold in the text editor. Is there a way in the API to switch between bold and unbold?
Thanks,
Comment by David Raynor — February 20, 2013 @ 12:11 pm
Sorry, there is no API access to get or set this boldness of individual characters in a text note.
Regards, Harry http://boostyourbim.wordpress.com https://twitter.com/BoostYourBIM https://www.facebook.com/BoostYourBim
On Wed, Feb 20, 2013 at 12:11 PM, Boost Your BIM – making Revit even better
Comment by harrymattison — February 20, 2013 @ 8:27 pm