control component suppression and configuration depending on assembly's configuration
Posted: Mon Sep 19, 2022 3:37 am
Much data is configuration-dependent and has corresponding API methods that allow the programmer to choose which configurations should be affected.
Examples:
Dimension value – IDimension.SetValue3
Feature suppression – IFeature.SetSuppression2
Component Bom Exclusion – IComponent2.SetExcludeFromBom2
I am looking for analog methods to control suppression state and active configuration of components, but I only found
- IComponent2.SetSuppression2 and IComponent2.ReferencedConfiguration which both just affect the active configuration of the owning assembly,
- IConfigurationManager.SetConfigurationParams (use "$state@componentName" for suppression and "$configuration@componentName" for configuration) which has some nasty side-effects: it creates a design table if none was present before; it changes design table settings if a design table was present before (it sets IDesignTable.AutoAddNewConfigs to False, IDesignTable.AutoAddNewParams to False, IDesignTable.EnableCellDropdownLists to True, IDesignTable.Updatable to False).
Are there any others? Which ones?
My program needs to be fast, so activating configurations just to set some data there is a no-go.
Examples:
Dimension value – IDimension.SetValue3
Feature suppression – IFeature.SetSuppression2
Component Bom Exclusion – IComponent2.SetExcludeFromBom2
I am looking for analog methods to control suppression state and active configuration of components, but I only found
- IComponent2.SetSuppression2 and IComponent2.ReferencedConfiguration which both just affect the active configuration of the owning assembly,
- IConfigurationManager.SetConfigurationParams (use "$state@componentName" for suppression and "$configuration@componentName" for configuration) which has some nasty side-effects: it creates a design table if none was present before; it changes design table settings if a design table was present before (it sets IDesignTable.AutoAddNewConfigs to False, IDesignTable.AutoAddNewParams to False, IDesignTable.EnableCellDropdownLists to True, IDesignTable.Updatable to False).
Are there any others? Which ones?
My program needs to be fast, so activating configurations just to set some data there is a no-go.