Hey Everyone.
I have some code that puts a note in specifick postions on the drawing. but some drawings have multiple sheets and i would like it to add them there to.
My code is:
Private Sub CreateNote()
DrawingDoc = app.ActiveDoc
vSheetNames = DrawingDoc.GetSheetNames
Note = DrawingDoc.InsertNote(Hnummer.Text)
For i = 0 To UBound(vSheetNames)
DrawingDoc.ActivateSheet(vSheetNames(i))
Next
If Not Note Is Nothing Then
Note.Angle = 0.15
Note.AllUpperCase = True
boolstatus = Note.SetBalloon(0, 0)
Annotation = Note.GetAnnotation()
Dim AttEntArr(0) As Object
AttEntArr(0) = swSelobj2
Dim vAttEntArrIn As Object
vAttEntArrIn = AttEntArr
boolstatus = Annotation.SetAttachedEntities(vAttEntArrIn)
If Not Annotation Is Nothing Then
boolstatus = Annotation.SetPosition2(0.14, 0.015, 0)
swTextFormat = Note.GetTextFormat
swTextFormat.Bold = True
swTextFormat.CharHeight = 0.005
boolstatus = Note.SetTextFormat(False, swTextFormat)
End If
End If
DrawingDoc.ClearSelection2(True)
DrawingDoc.WindowRedraw()
End Sub
Best regards