Main Content

validateModel

Class: Simulink.VariantConfigurationData
Package: Simulink

Activate and validate all variant blocks in a model hierarchy

Syntax

Simulink.VariantConfigurationData.validateModel(modelName)
Simulink.VariantConfigurationData.validateModel(modelName,configName)

Description

Simulink.VariantConfigurationData.validateModel(modelName), activates and validates the model and referenced models during simulation.

Simulink.VariantConfigurationData.validateModel(modelName,configName), activates and validates the model and referenced models during simulation optionally using a variant configuration.

Input Arguments

modelName

Name of the model

configName

Name of the configuration to be activated and validated

Examples

  1. Add the path to the model file.

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

  2. Load the model.

    load_system('slexVariantManagement');

  3. Activate and validate the model slexVariantManagement using the configuration LinInterExpNoNoise.

    [valid, errors] = Simulink.VariantConfigurationData.validateModel...
      ('slexVariantManagement','LinInterExpNoNoise')