Hello
To follow up on the froussel request, you will find HERE a program to manage the configurations of all the components of an assembly from the latter. As a bonus, you will also be able to manage the display or deletion of these components in the assembly as well as the setting to exclude from the bill of materials.
Not having found all the information I wanted in vba, I fell back on the C# language, I attached a small macro to launch this program through Solidworks, you just have to call this macro via a new button in Solidworks as it is done for every macro.
Kind regards