PART LIST SORTING

PART LIST SORTING

Lupe_Stewart
Advocate Advocate
372 Views
4 Replies
Message 1 of 5

PART LIST SORTING

Lupe_Stewart
Advocate
Advocate

I is there a way to sort a parts list automatically with the part number, in numerical order, and auto sort on update. this is one of those things that are repetitive, and would like to omit from sheet to sheet.

0 Likes
373 Views
4 Replies
Replies (4)
Message 2 of 5

bradeneuropeArthur
Mentor
Mentor
dim a as drawingdocument = thisdrawing.document
dim PartsList as Prartslist = a.activesheet.partslist.item(1)
PartsList.Sort( "Part Number", true ) 

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 3 of 5

bradeneuropeArthur
Mentor
Mentor
Dim a As DrawingDocument = ThisDrawing.Document

Dim partslist As PartsList = a.ActiveSheet.PartsLists.Item(1)
partslist.Sort("Part Number", true ) 

Part Number = CASE SENSITIVE! 

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 4 of 5

Lupe_Stewart
Advocate
Advocate

thanks for the reply..... when i put the rule in it gave this message:

The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))

0 Likes
Message 5 of 5

rhasell
Advisor
Advisor

Hi

 

as @bradeneuropeArthur mentioned, the Part Number is case sensitive, so however it is written in your parts list, that is how you must specify it.

 

The Autosort is tricky, that took me a while to find, but I have just done it for my needs, so I thought I would share it. You need to use the "sort2" option to enable the autosort.

 

Dim a As DrawingDocument = ThisDrawing.Document
Dim partslist As PartsList = a.ActiveSheet.PartsLists.Item(1)
partslist.Sort2("PART NUMBER", True, AutoSortOnUpdate :=True)
Reg
2026.1