I use follow code, But don't rotated Note. See Pic
.ObliqueAngle→rotate Note.
***********************
Aim need
*********************
Sub main()
Dim swApp As SldWorks.SldWorks
Dim swModel As SldWorks.ModelDoc2
Dim swSelMgr As SldWorks.SelectionMgr
Dim swAnnObj As Object
Dim swAnn As SldWorks.Annotation
Dim swTextFormat As SldWorks.TextFormat
Dim i As Long
Dim bRet As Boolean
Set swApp = Application.SldWorks
Set swModel = swApp.ActiveDoc
Set swSelMgr = swModel.SelectionManager
Set swAnnObj = swSelMgr.GetSelectedObject5(1)
Set swAnn = swAnnObj.GetAnnotation: Debug.Assert Not Nothing Is swAnn
' Get text format information
Debug.Print "File = " & swModel.GetPathName
Debug.Print " " & swAnn.GetName & " <" & swAnn.GetType & ">"
For i = 0 To swAnn.GetTextFormatCount - 1
Set swTextFormat = swAnn.GetTextFormat(i)
' Change text to be 10mm high, bold, italic, and Comic Sans MS font face
With swTextFormat
.CharHeight = 0.02
.Bold = True
.Italic = True
.TypeFaceName = "Comic Sans MS"
.Vertical = False
.ObliqueAngle = 45 * 3.1418926 / 180
Debug.Print .LineLength
Debug.Print .ObliqueAngle, .TypeFaceName
End With
With swAnn
End With
bRet = swAnn.SetTextFormat(i, False, swTextFormat): Debug.Assert bRet
Next
End Sub
------------------------
SolidworksApi macros