I have 2 questions. Is it possible to have all configurations selected in a BOM through api?
I currently have:
configuration = swView.ReferencedConfiguration
Set swBomAnn = swView.InsertBomTable4(True, 0, 0, anchorType, bomType, configuration, bomTemplate, False, swNumberingType_Detailed, True)
But this of course only enables 1 configuration. I need all.
A bit like pressing this button.
What I also need, is to extract (get) the used configuration name of an exsisting BOM and when I insert a new BOM (replacing the old one with a different bom-template) use that same configuration.
Because 'configuration = swView.ReferencedConfiguration' is not always the configuration of the BOM that was already in the drawing and then the part list becomes incorrect.
The Macro I'm writing replaces the exsisting BOM from Engineering and replaces it with a BOM suitable as a spare part list for customers.
i guess you can get all the names of all configurations with 2017 SOLIDWORKS API Help - GetConfigurationNames Method (IModelDoc2) and then use 2017 SOLIDWORKS API Help - GetConfigurationByName Method (IModelDoc2) to get each configuration and then use insertbomtable4 on each
Retrieving data ...