Yes this works although if an item is ballooned twice it will add the prefix twice...…..can it be changed to item or part rather then balloon?
Also, would like to add a '-' between prefix and balloon number. How can I do this? I have edited the code below so it prefix the property 'Title'
See below.
Thanks,
Sandy
Format:HTML Format Version:1.0 StartHTML: 165 EndHTML: 6452 StartFragment: 314 EndFragment: 6420 StartSelection: 314 EndSelection: 314SyntaxEditor Code Snippet
Sub Main()
Dim doc = ThisDoc.Document
If doc.DocumentType = DocumentTypeEnum.kDrawingDocumentObject Then
Dim oSheet As Sheet
oSheet = ActiveSheet.Sheet
Dim oBalloon As Inventor.Balloon
For Each oBalloon In oSheet.Balloons
oBalloon.BalloonValueSets.Item(1).Value = iProperties.Value("Summary", "Title") + oBalloon.BalloonValueSets.Item(1).ItemNumber
Next
Else
MessageBox.Show("Current docuement is not Drawing", "Document")
End If
End Sub