If you click Use Shortcut (
) in the
Method ribbon toolbar (or press Ctrl+K), the Method Editor checks the source code at the cursor. If it corresponds to an expression of a certain form, a
Use Shortcut dialog box appears, where you can enter the name of the shortcut in the
Name field. Click
OK to add the shortcut to the list in the
Settings window of the
Shortcuts node and to replace the source code that is represents with that shortcut. If there is more than one possible expression in the selected source code, a
Select Expression dialog box appears, where you can select the part to extract from the
Extract list. The expression must correspond to a model entity that is currently included in the embedded model.
Click OK in the
Use Shortcut dialog box to transform the source code into what is shown in the following figure.
The expression corresponding to the feature part of the source code has been replaced by the shortcut
mslc1, which is defined as
Results/pg1/mslc1.
If you click the Use Shortcut button when the cursor is not at an expression of a supported type, an error message appears. The expression form that is supported typically occurs when the model object API is used; for example, a sequence of method invocations on an object such as