RTW.getBuildDir - Build directory information for specified model
Syntax
struct=RTW.getBuildDir(modelName)
Arguments
- modelName
String specifying the name of a Simulink model, which can
be open or closed.
Returns
Structure containing the following build directory information
about the specified model:
| Field | Description |
| BuildDirectory | String specifying the fully qualified path to the build directory
for the model. |
| RelativeBuildDir | String specifying the build directory relative to the current
working directory (pwd). |
| BuildDirSuffix | String specifying the suffix appended to the model name to
create the build directory. |
| ModelRefRelativeBuildDir | String specifying the model reference target build directory
relative to current working directory (pwd). |
| ModelRefRelativeSimDir | String specifying the model reference target simulation directory
relative to current working directory (pwd). |
| ModelRefDirSuffix | String specifying the suffix appended to the system target
file name to create the model reference build directory. |
Description
The RTW.getBuildDir function returns build
directory 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 directory in which a model's generated code 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. |
Example
Return build directory 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: ''
 | rtwbuild | | rtwrebuild |  |
Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
Get this Simulink Kit