How to set configuration using macro?

I have an assembly.

There are a few configurations.

I want to set each of them to be

I record a macro, I can do that by select each configuration. I want to create an api to do that automatically for all configuration. How I can do that? Thanks

SolidworksApi/macros