The following code snippet can be used to get all item numbers to each components. But I can't find a way for getting the used configuration of each component. Does somebody know a solution?
BomTableAnnotation swBomAnn = default(BomTableAnnotation);
swBomAnn = m_swModelDocExt.InsertBomTable2(path, x, y, (int)swBomType_e.swBomType_TopLevelOnly, Configuration, Hidden);
string ItemNumber = null;
string PartNumber = null;
swBomAnn.GetModelPathNames(i, out ItemNumber, out PartNumber);
SolidworksApi macros