Adding general note (.IDW) and obtain its height

By Augusto Goncalves

Basically, the GeneralNote.FittedTextHeight property gives the height of text within a note. It does not necessarily represent the current height of the note. If Fitted property is true, these heights should be the same.

‘ get the document

Dim oDoc As DrawingDocument = m_inventorApplication.ActiveDocument

Dim sNote As String = _

  "<StyleOverride Font=’Arial’ FontSize=’0.5′ Bold=’True’>"+_

  "Sample note" + _

  "</StyleOverride>"

 

‘ create a note

Dim oDrawingNote As GeneralNote

oDrawingNote = oDoc.ActiveSheet.DrawingNotes. _

  GeneralNotes.AddFitted( _

    m_inventorApplication.TransientGeometry. _

    CreatePoint2d(10.0#, 10.0#), sNote)

 

‘ now get the height

Dim textHeight As Double = oDrawingNote.FittedTextHeight


Comments

Leave a Reply

Discover more from Autodesk Developer Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading