This is just a last minute quickie on my way out for the day, but here is some code you can play around with.
Sub Main
If ThisDoc.Document.DocumentType <> DocumentTypeEnum.kDrawingDocumentObject Then
MsgBox("A Drawing document must be active for this code to work. Exiting.", vbCritical, "")
Exit Sub
End If
Dim oDDoc As DrawingDocument = ThisDoc.Document
CopyNotesFromTemplate(oDDoc)
End Sub
Sub CopyNotesFromTemplate(oCopyTo As DrawingDocument)
If IsNothing(oCopyTo) Then Exit Sub
Dim oTemplateFile As String = "C:\Temp\MyDrawingTemplate.idw"
Dim oTemplate As DrawingDocument = ThisApplication.Documents.Open(oTemplateFile, False)
Dim oCopyToGNotes As GeneralNotes = oCopyTo.ActiveSheet.DrawingNotes.GeneralNotes
For Each oSheet As Sheet In oTemplate.Sheets
Dim oGNotes As GeneralNotes = oSheet.DrawingNotes.GeneralNotes
For Each oGNote As GeneralNote In oGNotes
If oGNote.Fitted Then
oCopyToGNotes.AddFitted(oGNote.Position, oGNote.FormattedText, oGNote.TextStyle)
Else
oCopyToGNotes.AddByRectangle(oGNote.RangeBox.MinPoint, oGNote.RangeBox.MaxPoint, oGNote.FormattedText, oGNote.TextStyle)
End If
Next
Next
End Sub
If this solved your problem, or answered your question, please click ACCEPT SOLUTION .
Or, if this helped you, please click (LIKE or KUDOS) 👍.
Wesley Crihfield

(Not an Autodesk Employee)