Select a BOM table annotation in
the graphics area.
Call
ISelectionMgr::GetSelectedObject6
to get the selected
ITableAnnotation.
Cast the selected
ITableAnnotation
object to an
IBomTableAnnotation.
Call
IBomTableAnnotation::GetBomTableSortData to create an
IBomTableSortData object.
Set the properties of
IBomTableSortData to define the sort.
-
(Optional) Set
IBomTableSortData::SaveCurrentSortParameters to true to save the sort
settings to the BOM table in the document during the sort. This allows you
to re-sort the table at a later date. See step 8.
Sort the table by calling
IBomTableAnnotation::Sort,
passing the
IBomTableSortData
object in SortData.
-
To re-sort the table at a later date, you can perform steps 1-7. But if
you previously performed steps 6 and 7 to save the sort settings to the BOM
table, you can quickly re-sort the table by only performing steps 1-4 and
calling
IBomTableAnnotation::ApplySavedSortScheme, which applies the sort
settings saved in the BOM table.