Params: IMetabaseObjectParams;
The Params property determines parameters of the global variables collection.
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: