IsShortcut: Boolean;
IsShortcut: Boolean;
The IsShortcut property determines whether the shortcut is created for the present repository object.
If the property is set to True, in the Shortcut property it is necessary to determine the repository object for which the shortcut is created.
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.Permanent := True;
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.Permanent := True;
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: