Creating a Shortcut by Script

You create a shortcut in a model using the CreateShortcut(ByVal NewPackage As BaseObject, ByVal ParentCol As String = "") As BaseObject method.

Example

' We want to reuse at the model level the interface defined in the package
' To do that, we need to create a shortcut of the interface at the model level
Dim IntfShct
If not FoundIntf is Nothing and not ExistingModel Is Nothing Then
 ' Call the CreateShortcut() method and specify the model 
 ' for the package where we want to create the shortcut
 Set IntfShct = FoundIntf.CreateShortcut(ExistingModel)
 If not IntfShct is nothing then
  output "The interface shortcut has been successfully created"
 End If 
End If