ISharedParams.IsShared

Syntax

IsShared: Boolean;

Description

The IsShared property determines a characteristic of the global object.

Comments

If the property is set to True, the object is considered an area of the global variables (MetabaseSpecialObject.SharedParams), if not, the object is not considered an area of the global variables. This property can be set to True for one repository object only, that is why when the property is set to True, it will be automatically set to False for the previous area.

By default the property is set to False.

Example

Sub main;

Var

MB : IMetabase;

CrInfo: IMetabaseObjectCreateInfo;

Des: IMetabaseObjectDescriptor;

Obj: IMetabaseObject;

Shp: ISharedParams;

Params: IMetabaseObjectParams;

Pa: IMetabaseObjectParam;

Begin

MB := MetabaseClass.Active;

Mb.SpecialObject(MetabaseSpecialObject.SharedParams) := Null;

 

//creation of the global variables area

CrInfo := Mb.CreateCreateInfo;

CrInfo.Id := "MyParam";

CrInfo.Name := "MyParam";

CrInfo.ClassId := MetabaseObjectClass.KE_CLASS_SHAREDPARAMS;

CrInfo.Parent := MB.ItemById("Folder");

CrInfo.Permanent := False;

Des := Mb.CreateObject(CrInfo);

 

Obj := Des.Edit;

Shp := Obj As ISharedParams;

Shp.IsShared := True;

Params := Shp.Params;

//parameter creation

Pa := Params.Add;

Pa.Id := "GLOBAL_INT";

Pa.DataType := DbDataType.Integer;

Pa.DefaultValue := 15;

Obj.Save;

End Sub main;

Area of the global parameters and one global variable are created after executing this example.

See also:

ISharedParams