API - Finding the config a study is referencing

I'm trying to write an API-macro that runs some selected studies in batch mode.

My problem is that I can't find any way to get the Configuration the Study is related to (inside from the macro of course).

Whithout information about the configuration I have to give both the name of the study and the configuration as input to the macro.

I only want to have the name of the Study as input. How can I get the corresponding configuration from within my macro?

/Robert

SolidworksApi macros