CreateBlocksInstance: IDimBlocksInstance;
CreateBlocksInstance(): Prognoz.Platform.Interop.Dimensions.IDimBlocksInstance;
The CreateBlocksInstance method returns collection of dictionary blocks instances.
Executing the example requires that the repository contains MDM table dictionary with set dynamic loading of elements and with the DYNDIM identifier.
Add links to the Dimensions and Metabase system assemblies.
Sub UserProc;
Var
MB: IMetabase;
Dim: IDynamicInstance;
BlocksInst: IDimBlocksInstance;
Begin
MB := MetabaseClass.Active;
Dim := MB.ItemById("DYNDIM").Open(Null) As IDynamicInstance;
// Get collection of dictionary blocks instances
BlocksInst := Dim.CreateBlocksInstance;
// Display collection size
Debug.WriteLine("Blocks in the dictionary: " + BlocksInst.Count.ToString);
End Sub UserProc;
After executing the example the console displays size of dictionary blocks collection.
The requirements and result of the Fore.NET example execution match with those in the Fore Example.
Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Dimensions;
…
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
Dim: IDynamicInstance;
BlocksInst: IDimBlocksInstance;
Begin
MB := Params.Metabase;
Dim := MB.ItemById["DYNDIM"].Open(Null) As IDynamicInstance;
// Get collection of dictionary blocks
BlocksInst := Dim.CreateBlocksInstance();
// Display size of blocks collection
System.Diagnostics.Debug.WriteLine("Blocks in the dictionary: " + BlocksInst.Count);
End Sub;
See also: