please help(traverse assembly)

In assembly, In the  active configuration we replace,  add, or  delete components.

How to receive the correct list of components in this assembly in other configuration without doing it active?

SolidworksApi macros