1. If you want to get a list of every component's in-use config, you need only use the macro called "Run code on every part in assembly" I have on my Macros page. (requires free membership) You will see where it provides sample code that prints config names and also custom properties. If you don't need the latter, just remove that code.
2. If you want to preselect a component, run the macro, and be told what config is in use, you can do that like this:
Dim swApp As SldWorks.SldWorks Dim swModel As SldWorks.ModelDoc2 Dim swSelMgr As SldWorks.SelectionMgr Dim swComp As SldWorks.Component2 Sub main() Set swApp = Application.SldWorks Set swModel = swApp.ActiveDoc Set swSelMgr = swModel.SelectionManager Set swComp = swSelMgr.GetSelectedObject6(1, -1) Debug.Print swComp.ReferencedConfiguration End Sub
In a design table the first column is the configuration name what is the "Link" name so I can put it in my drawing block as $PRPSHEET....???..... etc