Message 1 of 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have this code that expands the parts list of all assemblies. I want to change it to only expand rows when the description for the item contains "FIELD FABRICATE". Currently it will expand all items no matter what.
On Error Resume Next
Dim oDrawDoc As DrawingDocument
oDrawDoc = ThisApplication.ActiveDocument
''BOM sorting
Dim oPartsList1 As PartsList
oPartsList1 = oDrawDoc.ActiveSheet.PartsLists.Item(1)
Dim oRow As PartsListRow
''Parts List 1 To sort
If oPartsList1.Title = "PART LIST (PURCHASED)" Then
For Each oRow In oPartsList1.PartsListRows
If oRow.Item("DESCRIPTION").contains = "FIELD FABRICATE" Then
oRow.Expanded = True
End If
Next
oPartsList1.Sort2("VENDOR", 1, "STOCK NUMBER", 1, "SIZE", 1, AutoSortOnUpdate, True)
End If
ThisApplication.ActiveView.Fit
Solved! Go to Solution.