Shortcut Translation

Shortcuts are dereferenced during translation: the scope of the target object replaces the scope of the shortcut.

For example, the following generated file defined in the package metaclass provides the list of classes in the package. If a class shortcut is found, the code of its target object followed by (Shortcut) is generated, followed by the parent object ID and the shortcut ID which clearly shows that the scope of the shortcut is replaced by the scope of the shortcut target object:

.foreach_item(Classes)
 .if (%IsShortcut%)
%Code% (Shortcut)
oid = %ObjectID%
shortcut oid = %Shortcut.ObjectID%
 .else
%Code%
%Shortcut%
 .endif
.next(\n)

This is the opposite behavior as in VB Script where shortcut translation retrieves the shortcut itself.

If you want the shortcut itself to be generated instead of the target object, you can use the %Shortcut% variable.

External Shortcut

If the target model of an external shortcut is not open, a confirmation dialog box is displayed to let you open the target model. You can use the set_interactive_mode macro to change this behavior. This macro allows you to decide if the GTL execution must interact with the user or not.

For more information on the set_interactive_mode macro, see .set_interactive_mode macro.