Main Content

sltest.harness.export

Export test harness to Simulink model

Description

example

sltest.harness.export(harnessOwner,harnessName,'Name',modelName) exports the harness harnessName, associated with the model or component harnessOwner, to a new Simulink® model specified by the pair 'Name',modelName.

The model must be saved prior to exporting.

example

sltest.harness.export(harnessOwner,harnessName) detaches the harness harnessName from the associated model or component harnessOwner, and exports the harness to a standalone Simulink model with a default name.

Examples

collapse all

Export the harness controller_harness, which is associated with the Controller subsystem of the f14 model. The new model name is model_from_harness.

openExample('f14');
sltest.harness.create('f14/Controller','Name','controller_harness');
sltest.harness.export('f14/Controller','controller_harness','Name',...
'model_from_harness');

Input Arguments

collapse all

Model or component handle or path, specified as a character vector or double

Example: 1.9500e+03

Example: 'model_name'

Example: 'model_name/Subsystem'

The name of the harness, specified as a character vector.

Example: 'harness_name'

A valid MATLAB filename for the model generated from the harness, specified as a character vector.

Example: 'harness_name'

Version History

Introduced in R2015a