FactorsFilter: IDimSelectionSet;
FactorsFilter: Prognoz.Platform.Interop.Dimensions.IDimSelectionSet;
The FactorsFilter property returns dictionary selection according to which data of the time series database should be copied.
By default all time series of the source database are copied.
NOTE. This property is taken into account if the time series database is copied with its data, that is, the ICubeMetaUpdateEx.CopyData property is set to True.
Executing the example requires that the repository contains a time series database with the FC identifier. The database must contain a unique time series attribute that refers to the dictionary with the DICT_CTR identifier.
Add links to the Cubes, Dimensions and Metabase system assemblies.
Sub UserProc;
Var
mb: IMetabase;
RubUpdateEx: ICubeMetaUpdateEx;
Rub: IRubricator;
Progress: IMetabaseUpdateProgress;
CrInfo: IMetabaseObjectCreateInfo;
s: string;
SelSet: IDimSelectionSet;
Sel: IDimSelection;
Begin
mb := MetabaseClass.Active;
RubUpdateEx := New CubeMetaUpdateClass.Create As ICubeMetaUpdateEx;
Rub := mb.ItemById("FC").Bind As IRubricator;
RubUpdateEx.Rubricator := Rub;
RubUpdateEx.Metabase := Mb;
CrInfo := RubUpdateEx.CreateInfo;
CrInfo.Parent := mb.Root;
s := Mb.GenerateId("FC_COPY");
CrInfo.Id := s;
CrInfo.Name := s;
RubUpdateEx.CopyData := True;
SelSet := RubUpdateEx.FactorsFilter;
Sel := SelSet.FindById("DICT_CTR");
Sel.DeselectAll;
Sel.SelectElement(0, False);
RubUpdateEx.RdsDatabase := Rub.Database;
RubUpdateEx.Apply(Progress);
End Sub UserProc;
After executing the example, the FC time series database is copied to the repository root folder. The identifier of the copy is FC_COPY. Only time series data that are included into the specified selection is copied.
The requirements and result of Fore.NET example execution match with those in the Fore example.
Imports Prognoz.Platform.Interop.Cubes;
Imports Prognoz.Platform.Interop.Dimensions;
…
Public Shared Sub Main(Params: StartParams);
Var
mb: IMetabase;
RubUpdateEx: ICubeMetaUpdateEx;
Rub: IRubricator;
Progress: IMetabaseUpdateProgress;
CrInfo: IMetabaseObjectCreateInfo;
s: string;
SelSet: IDimSelectionSet;
Sel: IDimSelection;
Begin
mb := Params.Metabase;
RubUpdateEx := New CubeMetaUpdateClass.Create() As ICubeMetaUpdateEx;
Rub := mb.ItemById["FC"].Bind() As IRubricator;
RubUpdateEx.Rubricator := Rub;
RubUpdateEx.Metabase := Mb;
CrInfo := RubUpdateEx.CreateInfo;
CrInfo.Parent := mb.Root;
s := Mb.GenerateId("FC_COPY", 0);
CrInfo.Id := s;
CrInfo.Name := s;
RubUpdateEx.CopyData := True;
SelSet := RubUpdateEx.FactorsFilter;
Sel := SelSet.FindById("DICT_CTR");
Sel.DeselectAll();
Sel.SelectElement(0, False);
RubUpdateEx.RdsDatabase := Rub.Database;
RubUpdateEx.Apply(Progress);
End Sub;
See also: