User`s guide

Navigate to Simulink Objects from External Documents
9-21
Use the ActiveX Navigation Control
The RMI uses software that includes a special Microsoft ActiveX control to enable
navigation to Simulink objects from Microsoft Word and Excel documents. You can use
this same control in any other application that supports ActiveX within its documents.
The control is derived from a push button and has the Simulink icon. There are two
instance properties that define how the control works. The tooltipstring property is
the string that is displayed in the control tooltip. The MLEvalCmd property is the string
that you pass to the MATLAB software for evaluation when you click the control.
Typical Code Sequence for Establishing Navigation Controls
When you create an interface to an external tool, you can automate the procedure for
establishing links. This way, you do not need to manually update the dialog box fields.
This type of automation occurs as part of the selection-based linking for certain built-in
types, such as Microsoft Word and Excel documents.
To automate the procedure for establishing links:
1
Select a Simulink or Stateflow object and an item in the external document.
2
Invoke the link creation action either from a Simulink menu or command, or a
similar mechanism in the external application.
3
Identify the document and current item using the scripting capability of the external
tool. Pass this information to the MATLAB software. Create a requirement link on
the selected object using the RMI API as follows:
a
Create an empty link structure using the following command:
rmi('createempty')
b
Fill in the link structure fields based on the target location in the requirements
document.
c
Attach the link to the object using the following command:
rmi('cat')
4
Determine the MATLAB navigation command string that you must embed in the
external tool, using the navCmd method:
[ navCmd, objPath ] = rmi('navCmd',obj)