Shortcut Translation

Shortcuts are dereferenced during translation, so that the scope of the target object replaces the scope of the shortcut. This is different from VB Script where shortcut translation retrieves the shortcut itself. You can use the %IsShortcut% variable to test whether an object is a shortcut, and the Shortcut keyword to access the properties of the shortcut itself.

Template
In this example, the template is applied to an OOM package P1 containing two classes and two shortcuts to classes in P2:
.foreach_item(Classes)
\n*Class %Code% [%IsShortcut% ? From package %Package.Name% : Local Object]
.next
Result:
*Class C1  Local Object
*Class C2  Local Object
*Class C3  From package P2 
*Class C4  From package P2
Note: If your model contains shortcuts to objects in another model that is not open, a dialog box invites you to open the target model. You can use the .set_interactive_mode macro to change this behavior (see .set_interactive_mode Macro).