Main Content

removeSubModelConfiguration

(To be removed) Remove from a variant configuration, the configuration to be used for a referenced model

    removeSubModelConfiguration will be removed in a future release. For more information, see Version History.

    Description

    removeSubModelConfiguration(varconfigdata,configName,nameOfSubModel), removes the configuration specified for a referenced model.

    example

    Examples

    collapse all

    Add the path to the model file.

    addpath(fullfile(matlabroot,'examples','simulink_variants','main'));

    Load the model.

    load_system('slexVariantManagement');

    Obtain variant configuration data object for the model.

    vcdataObj = Simulink.VariantConfigurationData.getFor...
    ('slexVariantManagement');

    Add a new submodel configuration to LinInterExpNoNoise.

    vcdataObj.addSubModelConfigurations('LinInterExpNoNoise',...
      [struct('ModelName','slexVariantManagementExternalPlantMdlRef',...
      'ConfigurationName', 'LowFid')]);

    Remove the submodel configuration LinInterExpNoNoise from the submodel slexVariantManagementExternalPlantMdlRef.

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

    Input Arguments

    collapse all

    Variant configuration data object in which the top-level configuration configName is defined, specified as a Simulink.VariantConfigurationData object.

    Name of referenced model configuration to be removed, specified as a character vector or string.

    Example: "HighFidelityConfig"

    Data Types: char | string

    Name of referenced model from which the configuration must be removed, specified as a character vector or string.

    Example: "ExternalPlantMdlRef"

    Data Types: char | string

    Version History

    Introduced in R2013b

    collapse all