i dont know a standard function that does that but i wrote a ilogic rule that does this.
[iLogic]
Dim COLUMNNAME = "First used"
Dim doc As DrawingDocument = ThisApplication.ActiveDocument
Dim oSheet As Sheet = doc.ActiveSheet
Dim partsList As PartsList = oSheet.PartsLists.Item(1)
' collect item numbers, sheet numbers and location
Dim firstUseList As Dictionary(Of String, String) = New Dictionary(Of String, String)()
For index = 1 To doc.Sheets.Count
For Each balloon As Balloon In doc.Sheets.Item(index).Balloons
Dim bomRow As DrawingBOMRow = balloon.BalloonValueSets.Item(1).ReferencedRow
Dim itemNr As String = bomRow.BOMRow.ItemNumber
If (firstUseList.ContainsKey(itemNr) = False) Then
Dim baloondata As String = "SHT. " & index
baloondata = baloondata & ": " & Math.Round(balloon.Position.X * 10, 0)
baloondata = baloondata & "," & Math.Round(balloon.Position.Y * 10, 0)
firstUseList.Add(itemNr, baloondata)
End If
Next
Next
' search in partslist for the columns with item numbers and the 'First use' column.
Dim firstUsedColumnNr As Integer = -1
Dim itemNrColumn As Integer = -1
For i = 1 To partsList.PartsListColumns.Count
If (partsList.PartsListColumns.Item(i).Title.Equals(COLUMNNAME)) Then
firstUsedColumnNr = i
End If
If (partsList.PartsListColumns.Item(i).PropertyType = PropertyTypeEnum.kItemPartsListProperty) Then
itemNrColumn = i
End If
Next
' if the 'First use' column does not exists then cerate it
If (firstUsedColumnNr = -1) Then
firstUsedColumnNr = partsList.PartsListColumns.Count + 1
Dim oPropSet As PropertySet = doc.PropertySets.Item("Inventor User Defined Properties")
Dim id As String = oPropSet.InternalName
partsList.PartsListColumns.Add(PropertyTypeEnum.kCustomProperty, id, COLUMNNAME)
End If
' add the collected data to the 'First use' column
For index = 1 To partsList.PartsListRows.Count
Dim partsListRow As PartsListRow = partsList.PartsListRows.Item(index)
Dim itemNrCell As PartsListCell = partsListRow.Item(itemNrColumn)
If (firstUseList.ContainsKey(itemNrCell.Value)) Then
Dim firstUseCell As PartsListCell = partsListRow.Item(firstUsedColumnNr)
firstUseCell.Static = True
firstUseCell.Value = firstUseList(itemNrCell.Value)
End If
Next
copy past this in a rule and excute it when the sheet with the partslist is active. I was not able to get the "position square" of the ballon but i was able to get the coordinates (x,y)
Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

Blog: hjalte.nl - github.com