Quantcast

Documentation Center

  • Trial Software
  • Product Updates

slbuild

Build standalone and model reference targets

Syntax

slbuild('model')
slbuild('model','StandaloneRTWTarget')
slbuild('model','StandaloneRTWTarget','ForceTopModelBuild',true)

slbuild('model','CleanTopModel')

slbuild('model','ModelReferenceSimTarget')
slbuild('model','ModelReferenceRTWTarget')
slbuild('model','ModelReferenceRTWTargetOnly')

Description

    Note:   Except where noted, this command requires a Simulink® Coder™ license.

slbuild('model') builds a standalone Simulink Coder target executable from the specified model, using the current model configuration settings. If the model has not been loaded, slbuild loads it before initiating the build process.

slbuild('model','StandaloneRTWTarget') builds a standalone Simulink Coder target executable from the specified model (same as previous).

slbuild('model','StandaloneRTWTarget','ForceTopModelBuild',true) builds a standalone Simulink Coder target executable from the specified model. Specify the parameter ForceTopModelBuild with the value true if you want to force regeneration of the top model code. If the parameter is omitted or set to false, the build process determines whether regeneration of the top model code is necessary based on model checksums and options.

slbuild('model','CleanTopModel') cleans the model build area enough to trigger regeneration of the top model code at the next build.

    Note:   The following commands honor the setting of the Rebuild parameter on the Model Referencing pane of the Configuration Parameters dialog box for rebuilding the model reference target for this model and its referenced models.

slbuild('model','ModelReferenceSimTarget') builds a model reference simulation target for the model. This command does not require a Simulink Coder license.

slbuild('model','ModelReferenceRTWTarget') builds model reference simulation and Simulink Coder targets for the model.

slbuild('model','ModelReferenceRTWTargetOnly') builds a model reference Simulink Coder target for the model.

If the Rebuild parameter on the Model Referencing pane of the Configuration Parameters dialog box is set to Never, you can use two additional arguments, 'UpdateThisModelReferenceTarget' and Buildcond, to specify a rebuild option for building a model reference target for the model. For example,

slbuild('model','ModelReferenceSimTarget', ...
        'UpdateThisModelReferenceTarget', Buildcond)

conditionally builds the simulation target for model based on the value of Buildcond.

    Note:   The 'UpdateThisModelReferenceTarget' argument rebuilds the model reference target only for the specified model, not for any models referenced by the specified model.

Buildcond must be one of the following:

  • 'Force'

    Causes slbuild to always rebuild the model. This option is equivalent to the Always rebuild option on the Model Referencing pane of the Configuration Parameters dialog box.

  • 'IfOutOfDateOrStructuralChange'

    Causes slbuild to rebuild this model if it detects any changes. This option is equivalent to the If any changes detected rebuild option on the Model Referencing pane of the Configuration Parameters dialog box.

  • 'IfOutOfDate'

    Causes slbuild to rebuild this model if it detects any changes in known dependencies of this model. This option is equivalent to the If any changes in known dependencies detected rebuild option on the Model Referencing pane of the Configuration Parameters dialog box.

Was this topic helpful?