Extract subsystem or subchart contents into new model
extracts
the contents of the Atomic Subsystem block or atomic subchart newModel
= slvnvextract(subcomponent
)subcomponent
and
creates a model. slvnvextract
returns the name
of the new model in newModel
. If the model name
already exists,slvnvextract
uses the subsystem
or subchart name for the model name, appending a numeral to the model
name.
If an atomic subchart calls an exported graphical function that
is outside the subchart, slvnvextract
creates the
model, but the new model does not compile.
opens
the extracted model if you set newModel
= slvnvextract(subcomponent
,showModel
)showModel
to true
.
The extracted model is loaded only if you set showModel
to false
.
Extract the Atomic Subsystem block, Bus Counter,
from the sldemo_mdlref_conversion
model and copy
it into a new model:
open_system('sldemo_mdlref_conversion'); newmodel = slvnvextract('sldemo_mdlref_conversion/Bus Counter', true);
Extract the Atomic Subchart block, Sensor1,
from the sf_atomic_sensor_pair
model and copy it
into a new model:
open_system('sf_atomic_sensor_pair'); newmodel = slvnvextract('sf_atomic_sensor_pair/RedundantSensors/Sensor1', true);