IMetabaseObjectCreateInfo.IsShortcut

Fore Syntax

IsShortcut: Boolean;

Fore.NET Syntax

IsShortcut: Boolean;

Description

The IsShortcut property determines whether the shortcut is created for the present repository object.

Comments

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.

Fore Example

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.

Fore.NET Example

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:

IMetabaseObjectCreateInfo | Working with Shortcut