Main Content

sldvextract

Extract subsystem or subchart contents into new model for analysis

Description

example

newModel = sldvextract(subsystem) extracts the contents of the atomic subsystem subsystem and creates a model for the Simulink® Design Verifier™ software to analyze. sldvextract returns the name of the new model in newModel. If the model name exists, sldvextract uses the subsystem name for the model name, appending a number to the model name.

example

newModel = sldvextract(subchart) extracts the contents of the atomic subchart subchart and creates a model for the Simulink Design Verifier software to analyze. Specify the full path of the atomic subchart in subchart. If the model name exists, sldvextract uses the subchart name for the model name, appending a number to the model name.

Note

If the atomic subchart calls an exported graphical function that is outside the subchart, sldvextract creates the model, but the new model will not compile.

example

newModel = sldvextract(exportfcnmodel) creates a scheduler model that invokes the export-function model exportfcnmodel for analysis by Simulink Design Verifier. sldvextract returns the name of the new model in newModel. The newModel consists of exportfcnmodel model name with a suffix SldvScheduler. If the model name already exists, sldvextract uses the exportfcnmodel name for the model name, appending a number to the model name.

newModel = sldvextract(modelmissingslfunctiondef) extracts a stub model for the model modelmissingslfunctiondef which has missing Simulink function definitions for the Simulink Design Verifier to analyze. It returns the name of the new model in newModel. sldvextract uses the input model name with a suffix SldvStub for the extracted model name, appending a numeral to the model name if that model name already exists.

newModel = sldvextract(modelmissingslfunctiondef, showModel) opens the extracted model if you set showModel to true. Extracted model will be only loaded if showModel is set to false.

Examples

collapse all

Extract the atomic subsystem Bus Counter from the sldemo_mdlref_conversion model and copy it to a new model.

openExample('sldemo_mdlref_conversion');
newmodel = sldvextract('sldemo_mdlref_conversion/Bus Counter', true);

Extract the atomic subchart Sensor1 from the sf_atomic_sensor_pair model and copy it to a new model.

openExample('sf_atomic_sensor_pair');
newmodel = sldvextract('sf_atomic_sensor_pair/RedundantSensors/Sensor1',...
		true);

Create the scheduler model that invokes the sldvExportFunction_autosar_multirunnables model.

addpath(fullfile(docroot,'toolbox','sldv','examples'));
open_system('sldvExportFunction_autosar_multirunnables');
newmodel = sldvextract('sldvExportFunction_autosar_multirunnables');

Input Arguments

collapse all

Full path to the atomic subsystem, specified as a character vector or string scalar.

Full path to the Stateflow® atomic subchart, specified as a character vector or string scalar.

Full path to the export-function model, specified as a character vector or string scalar.

Full path to the missing Simulink function model, specified as a character vector or string scalar.

Whether to display the extracted model, specified as a logical.

Output Arguments

collapse all

Name of the new model, returned as a character vector.

Version History

Introduced in R2007a