attachToModel

Class: RTW.ModelCPPClass
Package: RTW

Attach model-specific C++ class interface to loaded ERT-based Simulink model

Syntax

attachToModel(obj, modelName)

Description

attachToModel(obj, modelName) attaches a model-specific C++ class interface to a loaded ERT-based Simulink® model.

Input Arguments

objHandle to a model-specific C++ class interface control object, such as a handle previously returned by obj = RTW.ModelCPPArgsClass or obj = RTW.ModelCPPDefaultClass.
modelNameCharacter vector specifying the name of a loaded ERT-based Simulink model to which the object is going to be attached.

Alternatives

The Configure C++ Class Interface button on the Interface pane of the Simulink Configuration Parameters dialog box launches the Configure C++ class interface dialog box, where you can flexibly control the C++ class interfaces that are generated for your model. Once you validate and apply your changes, you can generate code based on your C++ class interface modifications. See Customize C++ Class Interfaces Using Graphical Interfaces.