Using environment variables with reference units

If you have a reference unit in your model (added using Add to Model As Reference), you can edit its location using the Directory field of the Unit Information window, and use an environment variable as part of that location.

About this task

Note: When you add a reference to your model, IBM® Rational® Rhapsody® adds the packages as top‑level packages by default. However, you can move the reference packages so they become nested packages.

For example, you can use a relative path (..\) or the environment variable $ENV_VAR. If you set the General::Model::EnvironmentVariables property to include the path of this environment variable, the product parses and executes that environment variable when it opens the project, and then searches for the reference unit in the specified location.

Note: If you use relative paths, note that the path is relative to the _rpy folder, not where the .rpy file is located.

Feedback