Params: IMetabaseObjectParams;
The Params property determines parameters of the global variables collection.
Sub UserProc;
Var
MB : IMetabase;
CrInfo: IMetabaseObjectCreateInfo;
Des: IMetabaseObjectDescriptor;
Obj: IMetabaseObject;
Shp: ISharedParams;
Params: IMetabaseObjectParams;
Pa: IMetabaseObjectParam;
Begin
MB := MetabaseClass.Active;
Mb.SpecialObject(MetabaseSpecialObject.SharedParams) := Null;
//create a 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;
//create a parameter
Pa := Params.Add;
Pa.Id := "GLOBAL_INT";
Pa.DataType := DbDataType.Integer;
Pa.DefaultValue := 15;
Obj.Save;
End Sub UserProc;
Area of the global parameters and one global variable are created after executing this example.
See also: