08-01-2023
04:38 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
08-01-2023
04:38 PM
Hi @dleesuk
You can use something like this to find the largest rev letter.
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
Dim oDrawDoc As DrawingDocument oDrawDoc = ThisApplication.ActiveDocument Dim oPartList As PartsList oPartList = oDrawDoc.ActiveSheet.PartsLists.Item(1) oMax = "A" oRowMax = 1 ' Iterate through the contents of the parts list Dim i As Long For i = 1 To oPartList.PartsListRows.Count 'look at only the REVISION column oCell = oPartList.PartsListRows.Item(i).Item("REVISION") Dim letterarray As New ArrayList letterarray.Add(oCell.Value) letterarray.Add(oMax) letterarray.Sort oMax = letterarray.Item(1) If oCell.Value = oMax Then oRowMax = i Next MsgBox("Row " & oRowMax & " has the largest rev letter of " & _ oPartList.PartsListRows.Item(oRowMax).Item("REVISION").Value, , "iLogic")