Products & Services Solutions Academia Support User Community Company

Learn more about Real-Time Workshop   

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:

FieldDescription
BuildDirectoryString specifying the fully qualified path to the build directory for the model.
RelativeBuildDirString specifying the build directory relative to the current working directory (pwd).
BuildDirSuffixString specifying the suffix appended to the model name to create the build directory.
ModelRefRelativeBuildDirString specifying the model reference target build directory relative to current working directory (pwd).
ModelRefRelativeSimDirString specifying the model reference target simulation directory relative to current working directory (pwd).
ModelRefDirSuffixString 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.

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: ''
  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS