CreateAttributes: IDimAttributes;
CreateAttributes(): Prognoz.Platform.Interop.Dimensions.IDimAttributes;
The CreateAttributes method returns collection of dictionary attributes.
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;
Attributes: IDimAttributes;
AttrsInst: IDimAttributesInstance;
Begin
MB := MetabaseClass.Active;
Dim := MB.ItemById("DYNDIM").Open(Null) As IDynamicInstance;
// Get collection of dictionary attributes
Attributes := Dim.CreateAttributes;
// Get collection of dictionary attributes instances
AttrsInst := Dim.CreateAttributesInstance;
// Display attribute name and first element attribute value
Debug.WriteLine("Attribute name: " + Attributes.Item(0).Name +
"; First element attribute value: " + AttrsInst.Item(0).Value(0));
End Sub UserProc;
After executing the example the console displays attribute name and value of this attribute for the first element.
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;
Attributes: IDimAttributes;
AttrsInst: IDimAttributesInstance;
Begin
MB := Params.Metabase;
Dim := MB.ItemById["DYNDIM"].Open(Null) As IDynamicInstance;
// Get collection of dictionary attributes
Attributes := Dim.CreateAttributes();
// Get collection of dictionary attributes instances
AttrsInst := Dim.CreateAttributesInstance();
// Display attribute name and first element attribute value
System.Diagnostics.Debug.WriteLine("Attribute name: " + Attributes.Item[0].Name +
"; First element attribute value: " + AttrsInst.Item[0].Value[0]);
End Sub;
See also: