DataLoadingGroupCollection: IMsDataLoadingGroupCollection;
The DataLoadingGroupCollection property returns the collection of groups, in which separate data loading is executed before calculation.
Separate loading groups are used by calculation algorithm blocks.
The attribute of separate loading can be set in the Fore language using the IMsCalculationChainMetaModel.SeparateDataLoading property. The single groups that are created in the DataLoadingGroupCollection collection can be assigned to blocks using the SetAlg operation.
Executing the example requires that the repository contains a calculation algorithm with the ALGORITHM identifier.
Add links to the Algo, Metabase, Ms system assemblies. Add a link to the assembly that is required to work with calculation algorithm.
Sub UserProc;
Var
MB: IMetabase;
MObj: IMetabaseObjectDescriptor;
Algo: ICalcObject;
CalcAlgo: ICalcAlgorithm;
MetaModel: IMsMetaModel;
DataLoadingGroups: IMsDataLoadingGroupCollection;
DataLoadingGroup: IMsDataLoadingGroup;
Begin
MB := MetabaseClass.Active;
MObj := MB.ItemById("ALGORITHM");
Algo := CalcObjectFactory.CreateCalcObject(MObj, True);
CalcAlgo := Algo As ICalcAlgorithm;
MetaModel := CalcAlgo.MsProblem.MetaModel;
// Collection of separate loading groups
DataLoadingGroups := MetaModel.DataLoadingGroupCollection;
DataLoadingGroup := DataLoadingGroups.Add;
DataLoadingGroup.Name := "Load from the first data source";
DataLoadingGroup := DataLoadingGroups.Add;
DataLoadingGroup.Name := "Load from the second data source";
// Save changes
CalcAlgo.SaveObject;
End Sub UserProc;
After executing the example, two separate loading groups are created for calculation algorithm blocks.
See also: