I just made a macro for doing this and put a button for it on my drawing toolbar. Like Blair said, it is not self-updating, but if you went to the trouble to make an Add-in, you could make the Parts List sort itself OnSave.
---------------------------------------------------------------------------
Public Function GetActiveDrawing() As DrawingDocument
If ThisApplication.ActiveDocument.DocumentType = kDrawingDocumentObject Then
Set GetActiveDrawing = ThisApplication.ActiveDocument
Else
MsgBox "Must have a drawing active", vbOKOnly, "Error"
End If
End Function
Public Function GetSelectedPartsList() As PartsList
Dim oDrawDoc As DrawingDocument
Set oDrawDoc = GetActiveDrawing
If oDrawDoc Is Nothing Then Exit Function
Dim oSelectSet As SelectSet
Set oSelectSet = oDrawDoc.SelectSet
If oSelectSet.Count = 0 Then Exit Function
If oSelectSet.Item(1).Type <> kPartsListObject Then Exit Function
Set GetSelectedPartsList = oSelectSet.Item(1)
End Function
Public Function FormatPartsList(oPartsList As PartsList) As PartsList
On Error Resume Next
oPartsList.Sort "SUB-ASSEMBLY", False, "MATERIAL NAME", True, "PART NUMBER", True
oPartsList.Renumber
If Err Then
Err.Clear
MsgBox "Could not sort Parts List", , "Error"
End If
Set FormatPartsList = oPartsList
End Function
Public Sub FormatSelectedPartsList()
Dim oPartsList As PartsList
Set oPartsList = GetSelectedPartsList
If oPartsList Is Nothing Then Exit Sub
FormatPartsList oPartsList
End Sub
Message was edited by: Josh_Petitt