User`s guide

9 Custom Types of Requirements Documents
9-20
Navigate to Simulink Objects from External Documents
The RMI includes several functions that simplify creating navigation interfaces in
external documents. The external application that displays your document must support
an application programming interface (API) for communicating with the MATLAB
software.
Provide Unique Object Identifiers
Whenever you create a requirement link for a Simulink or Stateflow object, the RMI
uses a globally unique identifier for that object. This identifier identified the object. The
identifier does not change if you rename or move the object, or add or delete requirement
links. The RMI uses the unique identifier only to resolve an object within a model.
Use the rmiobjnavigate Function
The rmiobjnavigate function identifies the Simulink or Stateflow object, highlights
that object, and brings the editor window to the front of the screen. When you navigate to
a Simulink model from an external application, invoke this function.
The first time you navigate to an item in a particular model, you might experience a
slight delay while the software initializes the communication API and the internal data
structures. You do not experience a long delay on subsequent navigation.
Determine the Navigation Command
To create a requirement link for a Simulink or Stateflow object, at the MATLAB prompt,
use the following command to find the navigation command string, where obj is a handle
or a uniquely resolved name for the object:
[ navCmd, objPath ] = rmi('navCmd', obj);
The return values of the navCmd method are:
navCmd — A string that navigates to the object when evaluated by the MATLAB
software.
objPath — A string that identifies the model object
Send the navCmd strings to the MATLAB software for evaluation when navigating from
the external application to the object obj in the Simulink model. Use and objPath
string to visually identify the target object in the requirements document.