• Blog posts

    Bio

    By Florentina Stirbu

    Inventor_-_Parts_list_sorting__iLogic__-_1.PNG

    The Parts List table default style can be configured in the Style Library manager. This allows for selecting the properties to be included in the tables as columns and setting the width for each, defining the text style used and setting any groups/filters needed.

    However, sorting cannot be defined in the Style Library. On all parts list tables, the sorting is off by default – for each individual table, on all drawings, a user would have to manually edit the sorting.

    iLogic can be used to set sorting parameters and the code can be included in the drawing template if the same sorting is expected across multiple drawings.

    Inventor_-_Parts_list_sorting__iLogic__-_2.PNG

    There are 2 methods that can be used for sorting:

    Partslist.Sort – each column to sort by is listed as string, followed by a Boolean to set the sorting to ascending (True) or descending (false).

    Inventor_-_Parts_list_sorting__iLogic__-_3.PNG

    Partslist.Sort2  - has two additional Booleans for sorting by string and auto sorting on update.

    Inventor_-_Parts_list_sorting__iLogic__-_4.PNG

    Default:

    Inventor_-_Parts_list_sorting__iLogic__-_5.PNG

    After running the code:

    Inventor_-_Parts_list_sorting__iLogic__-_6.PNG

    The iLogic code is attached below – change the column strings and/or Boolean values as needed.

    Inventor_-_Parts_list_sorting__iLogic__-_7.PNG