Main Content

removeSubModelConfiguration

Class: Simulink.VariantConfigurationData
Package: Simulink

Remove from a variant configuration, the configuration to be used for a sub model.

Syntax

vcdataObj.removeSubModelConfiguration(nameOfConfiguration,nameOfSubModel)

Description

vcdataObj.removeSubModelConfiguration(nameOfConfiguration,nameOfSubModel), removes the configuration specified for a submodel.

Input Arguments

nameOfConfiguration

Name of the submodel configuration to be removed.

nameOfSubModel

Name of the submodel from which the configuration must be removed.

Examples

  1. Add the path to the model file.

    addpath(fullfile(docroot,'toolbox','simulink','examples'));
    

  2. Load the model.

    load_system('slexVariantManagement');
    
  3. Add a new submodel configuration to LinInterExpNoNoise.

    vcdataObj.addSubModelConfigurations('LinInterExpNoNoise',...
      [struct('ModelName','slexVariantManagementExternalPlantMdlRef',...
      'ConfigurationName', 'LowFid')]);
  4. Remove the submodel configuration LinInterExpNoNoise from the submodel slexVariantManagementExternalPlantMdlRef.

    vcdataObj.removeSubModelConfiguration('LinInterExpNoNoise',...
      'slexVariantManagementExternalPlantMdlRef')