| Contents | Index |
struct=RTW.getBuildDir(modelName)
Structure containing the following build folder information about the specified model:
| Field | Description |
|---|---|
| BuildDirectory | String specifying the fully qualified path to the build folder for the model. |
| RelativeBuildDir | String specifying the build folder relative to the current working folder (pwd). |
| BuildDirSuffix | String specifying the suffix appended to the model name to create the build folder. |
| ModelRefRelativeBuildDir | String specifying the model reference target build folder relative to current working folder (pwd). |
| ModelRefRelativeSimDir | String specifying the model reference target simulation folder relative to current working folder (pwd). |
| ModelRefDirSuffix | String specifying the suffix appended to the system target file name to create the model reference build folder. |
The RTW.getBuildDir function returns build folder information for a specified model, which can be open or closed. If the model is closed, the function opens and then closes the model, leaving it in its original state.
This function can be used in automated scripts to programmatically determine the build folder in which the generated code for a model would be placed if the model were built in its current state.
Note The RTW.getBuildDir function may take significantly longer to execute if the specified model is large and closed. |
Return build folder information for the model mymmodel.
>> info=RTW.getBuildDir('mymodel');
>> info
info =
BuildDirectory: 'c:\work\mymodel_ert_rtw'
RelativeBuildDir: 'mymodel_ert_rtw'
BuildDirSuffix: '_ert_rtw'
ModelRefRelativeBuildDir: 'slprj\ert\mymodel'
ModelRefRelativeSimDir: 'slprj\sim\mymodel'
ModelRefDirSuffix: ''

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |