I don't see any notification for the event of adding a configuration:
You could use this example:
and make the code:
- Get all configurations
- Get all configuration's properties
- Get the properties values you're interested
- Test the values and auto-fill if they're empty, or create the properties if they don't exist
It could be triggered by a rebuild or by any other event you think is suitable, since there's no specific notification on the event you want.
This threads could also help:
For adding a new configuration in a Part Document, kindly check the following event: -
This event has parameter for entity Type which is "Configuration" when a new configuration is added.
Since this event is called every time a new item is added to SolidWorks Part Document, it is also recommended to use the DPartDocEvents_ActiveConfigChangeNotifyEventHandler event. This is a pre-notification when ever the user is changing the active configuration. This is called after a new configuration is added (after the AddItemNotifyEvent). Here you can check if the custom property in the document and add them if they do not exist. This enhances performance.
Hope it helps!!!
Sorry for taking so long to respond, i got held up with some other stuff. I tried using DPartDocEvents_ActiveConfigChangeNotifyEventHandler, and works perfectly. Thank you very much.