GetDerivedBOMs Question

I'm working on a simple little add-in that will allow users to right click a drawing or assembly file and print a BOM from it. 

Since the order of a computed BOM has no relationship to the order of the parts in the assembly,  I am using derived BOMs based on the Bill of Material in the drawing so that everything stays synchronized if the model is changed.  There are no named BOMs being used.

I have noticed that in this scenario, GetDerivedBOMs will return a distinct BOM (unique ID) for each version of the underlying SolidWorks file.  If I call GetObject on any of the BOM IDs of these derived BOMs to retrieve the IEdmBom from the vault, the resulting object is a BOM with a single version (checked by calling GetVersions()) corresponding to an underlying version of the drawing file.

It seems odd that a single drawing file with multiple versions leads to multiple BOMs with a single version each.

In order to make sure that I get the lastest version of the BOM for printing, I am forced to assume that the highest document ID is the most recent version.  The timestamps cannot be used because there may be a delay between the drawing versionand the BOM version.  This is all quite kludgy, and I'd rather have something more robust.

Have I missed something or is this my only option?

Jim S.

SolidworksSolidworks Pdm enterprise Pdm