Simulink.SubSystem.convertToModelReference

Convert atomic subsystem or function call subsystem to model reference

Syntax

[success,mdlRefBlkH] = Simulink.SubSystem.convertToModelReference(subsys, mdlRef, 'opt1', 'val1', 'opt2', 'val2', ...)

Description

[success,mdlRefBlkH] = Simulink.SubSystem.convertToModelReference(subsys, mdlRef, 'opt1', 'val1', 'opt2', 'val2', ...) converts an atomic subsystem or function call subsystem to a referenced model. The function does this by creating a new model, copying the contents of the subsystem into the model, and configuring the root level Inport and Outport blocks and configuration parameters of the new model. Then, based on its input arguments, the function either replaces the subsystem block with a Model block that references the new model, or it creates another, temporary model containing a Model block that references the new model.

Converting a subsystem to a referenced model requires your model to have the following configuration parameter settings:

You can use the following commands to set these parameters to the values required by this function:

set_param(mdlName, 'InlineParams', 'on');
set_param(mdlName, 'SignalResolutionControl', 'UseLocalSettings');
set_param(mdlName, 'StrictBusMsg', 'ErrorLevel1');

This function accepts the following arguments:

This function returns the following outputs:

See Also

Simulink.BlockDiagram.copyContentsToSubSystem

Simulink.Bus.save

Simulink.SubSystem.copyContentsToBlockDiagram

Converting a Subsystem to a Referenced Model

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS