I'm building a PDM Task Add-in for creating BoMs to allow us to generate specific boms for different purposes. The task loads a "MasterBom" (EdmBomLayout) from PDM that contains all possible columns and populates a CheckedListBox on a form with all columns. I'd like to be able to decide which columns are exported to CSV, and (if possible) reorder the columns.
I don't see any documentation on adding/removing/reordering columns, but the Column Variable ID(mlVariableID) is not a read-only entity(As far as I'm aware). If i parse through the columns and grab the IDs of the columns that match the names(mbsCaption) I want, can i rewrite the Variable ID using SetVar in each column to effectively reorder them? Is it possible to edit an EdmBomLayout directly or create a new from scratch that only contains the columns I'm looking for? Maybe I'm looking at this from the wrong angle.
What I do not want to have to do is manipulate the CSV file after it is created, or have to open a SolidWorks document and manipulate the table on a dummy drawing/etc.