Hi, here is an example of how to format your text in a new drawing note via VB.Net.
Red highlighted is to be changed.
Dim oDoc As Inventor.Document = InventorApplication.ActiveDocument
Dim stext As String
stext = "<StyleOverride Font='ARIAL' FontSize = '0.1524' >PRINTED: " & Now() & "<Br/>BY: " & InventorApplication.GeneralOptions.UserName & "</StyleOverride>"
' Set a reference to the GeneralNotes object
Dim oGeneralNotes As Inventor.GeneralNotes = oDoc.ActiveSheet.DrawingNotes.GeneralNotes
Dim oTG As Inventor.TransientGeometry = InventorApplication.TransientGeometry
Dim oGeneralNote As Inventor.GeneralNote = oGeneralNotes.AddFitted(oTG.CreatePoint2d(0.3, 1.5), stext)
' Set the color of the note
Dim oColor As Inventor.Color = InventorApplication.TransientObjects.CreateColor(128, 128, 128)oGeneralNote.Color = oColor
' Set the rotation of the note in Radians (1.5 ~ 90°)
oGeneralNote.Rotation = 1.5
Consider using "Accept as Solution" / "Kudos" if you find this helpful.
- - - - - - - - - - - - - - -
Regards,
Mike
"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." - John F. Woods