05-16-2022
05:38 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
05-16-2022
05:38 AM
Hello Everyone,
This is my first post on the forum, i've looked around but i couldnt find the answer.
We use partnumbers that are a mix of letters and numbers. Example:
651-004-WA001
This partnumber will show in the partslist. Now i want to make an ilogic that only shows WA numbers in the partslist.
I've come to this:
' Set a reference to the drawing document. ' This assumes a drawing document is active. Dim oDrawDoc As DrawingDocument oDrawDoc = ThisApplication.ActiveDocument ' Set a reference to the first parts list on the active sheet. ' This assumes that a parts list is on the active sheet. Dim oPartList As PartsList oPartList = oDrawDoc.ActiveSheet.PartsLists.Item(1) ' Iterate through the contents of the parts list. Dim i As Long For i = 1 To oPartList.PartsListRows.Count 'look at only the part number column oCell = oPartList.PartsListRows.Item(i).Item("Part Number") 'look at iproperty value If oCell.Value = "" Then 'show the row oPartList.PartsListRows.Item(i).Visible = True Else 'hide the row oPartList.PartsListRows.Item(i).Visible = False End If Next
But a i dont know how to filter on the WA section of the partslist. (xxx-xxx-WAxxx)
Can somebody help me?
Kind regards,
Koen
Solved! Go to Solution.