IMetabase.SpecialObjects

Syntax

SpecialObjects(ForEdit: Boolean): ISpecialObjects;

SpecialObjects[ForEdit: boolean]: Prognoz.Platform.Interop.Metabase.ISpecialObjects;

Parameters

ForEdit. The parameter that defines if there will an opportunity to change parameters of special objects.

If the True value is passed as a parameter value, there will be an opportunity to change parameters of special objects.

If the False value is passed as a parameter value, parameters of special objects are available only for reading.

Description

The SpecialObjects property returns collection of special repository objects.

Example

Executing the example requires that the repository contains a map with the RUSSIA identifier.

Add a link to the Metabase system assembly.

Sub UserProc;
Var
    MB: IMetabase;
    SpecObj: ISpecialObjects;
Begin
    MB := MetabaseClass.Active;
    SpecObj := MB.SpecialObjects(True);
    SpecObj.SpecialObject(MetabaseSpecialObject.DefaultTopobase) := MB.ItemById("RUSSIA");
    (SpecObj As IMetabaseObject).Save;
End Sub UserProc;
Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    SpecObj: ISpecialObjects;
Begin
    MB := Params.Metabase;
    SpecObj := MB.SpecialObjects[True];
    SpecObj.SpecialObject[MetabaseSpecialObject.msoDefaultTopobase] := MB.ItemById["RUSSIA"];
    (SpecObj As IMetabaseObject).Save();
End Sub;

After executing this example the RUSSIA map is set as a default map for the current repository.

See also:

IMetabase