02-22-2019
04:38 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
02-22-2019
04:38 AM
@GeorgK ,
Hoping that below iLogic code may be helpful to sort part numbers.
Dim oDoc As DrawingDocument
oDoc = ThisApplication.ActiveDocument
Dim oSheet As Sheet
oSheet = oDoc.ActiveSheet
Dim oPartslist As PartsList
oPartslist = oSheet.PartsLists.Item(1)
Dim oRow As PartsListRow
Dim myList As New List(Of String)()
Dim i As Integer
For Each oRow In oPartslist.PartsListRows
If oRow.Item(3).Value.Length = 13 Then
myList.Add(oRow.Item(3).Value)
End If
Next
Dim list() As String = myList.ToArray()
Dim result = list.OrderBy(Function(q) q.Substring(11)).ToArray
i = 1
For Each s As String In result
For Each oRow In oPartslist.PartsListRows
If s = oRow.Item(3).Value Then
Call oRow.Reposition(i)
i = i + 1
End If
Next
Next
Thanks and regards,
CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network
