Auto Text in Drawing idw
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all,
I found below code to create the general notes in drawing idw. It works fine. But, i have one issue with this code. Everytime, i run this code. It simply creates new general notes. I don't want to create the general notes each time. Is it possible to track the general notes and replace the text on each time.
Dim oDrawDoc As DrawingDocument
oDrawDoc = ThisApplication.ActiveDocument
' Set a reference to the active sheet.
Dim oActiveSheet As Sheet
oActiveSheet = oDrawDoc.ActiveSheet
' Set a reference to the GeneralNotes object
Dim oGeneralNotes As GeneralNotes
oGeneralNotes = oActiveSheet.DrawingNotes.GeneralNotes
Dim oTG As TransientGeometry
oTG = ThisApplication.TransientGeometry
'Dim dGeneralNote As GeneralNote
'dGeneralNote = oGeneralNotes.delete()
oGeneralNotes.Delete()
' Create text with simple string as input. Since this doesn't use
' any text overrides, it will default to the active text style.
Dim sText As String
sText = iProperties.Value("Custom", "Component type")
Dim oGeneralNote As GeneralNote
oGeneralNote = oGeneralNotes.AddFitted(oTG.CreatePoint2d(3, 3), sText)
Please let me know your ideas.
Thanks for your time and effort in advance.
Regards,
SJ