Shortcut: IMetabaseObjectDescriptor;
Shortcut: Prognoz.Platform.Interop.Metabase.IMetabaseObjectDescriptor;
The Shortcut property determines the repository object for which the shortcut should be created.
The necessary condition for creating the shortcut is setting the IsShortcut property to True.
Executing the example requires that the repository contains an object with the OBJTEST identifier.
Sub UserProc;
Var
MB: IMetabase;
CrInfo: IMetabaseObjectCreateInfo;
Begin
MB := MetabaseClass.Active;
CrInfo := MB.CreateCreateInfo;
CrInfo.Id := "Shortcut_OBJTEST";
CrInfo.Name := Shortcut for OBJTEST;
CrInfo.Parent := MB.Root;
CrInfo.Shortcut := MB.ItemById("OBJTEST");
CrInfo.IsShortcut := True;
MB.CreateObject(CrInfo);
End Sub UserProc;
After executing the example a shortcut for the OBJTEST object will be created in the root of the repository.
Executing the example requires that the repository contains an object with the OBJTEST identifier.
Imports Prognoz.Platform.Interop.Metabase;
Imports System;
Public Sub Main(Params: StartParams);
Var
MB: IMetabase;
CrInfo: IMetabaseObjectCreateInfo;
Begin
MB := Params.Metabase;
CrInfo := MB.CreateCreateInfo();
CrInfo.Id := "Shortcut_OBJTEST";
CrInfo.Name := Shortcut for OBJTEST;
CrInfo.Parent := MB.Root;
CrInfo.Shortcut := MB.ItemById["OBJTEST"];
CrInfo.IsShortcut := True;
MB.CreateObject(CrInfo);
End Sub;
After executing the example a shortcut for the OBJTEST object will be created in the root of the repository.
See also: