CreateFacts;
The CreateFacts method creates a composite dictionary in the MDM repository to store information about indicators of time series database.
Executing the example requires that the repository contains a database with the BD identifier.
Sub UserProc;
Var
Mb: IMetabase;
NewRDS: IRdsDatabase;
NewRub: IRubricator;
CrInfo: IMetabaseObjectCreateInfo;
Begin
Mb := MetabaseClass.Active;
// Create an MDM repository
CrInfo := MB.CreateCreateInfo;
CrInfo.ClassID := MetabaseObjectClass.KE_CLASS_RDS_DATABASE;
CrInfo.Id := "NewNSI";
CrInfo.Name := "NewNSI";
CrInfo.Parent := MB.Root;
CrInfo.Permanent := True;
NewRDS := MB.CreateObject(CrInfo).Edit As IRdsDatabase;
NewRDS.Database := Mb.ItemById("BD").Bind As IDatabase;
(NewRDS As IMetabaseObject).Save;
// Create a time series database
CrInfo.ClassID := MetabaseObjectClass.KE_CLASS_RUBRICATOR;
CrInfo.Id := "NewCatalog";
CrInfo.Name := "NewCatalog";
CrInfo.Parent := MB.Root;
CrInfo.Permanent := True;
NewRub := MB.CreateObject(CrInfo).Edit As IRubricator;
NewRub.Database := NewRDS;
// Create main dictionaries in MDM repository
NewRub.CreateMeasures;
NewRub.CreateUnits;
NewRub.CreateFacts;
NewRub.CreateRevisions;
NewRub.CreateValues;
(NewRub As IMetabaseObject).Save;
End Sub UserProc;
After executing the example an MDM repository and a time series database are created in the repository root. All basic dictionaries required for working with the time series database are created in the MDM repository.
See also: