EnsureValuesLoaded(AttributeKeys: Array; Option: Integer; Filter: IDimSelection);
AttributeKeys. Keys of loaded attributes.
Option. Option of attribute values loading.
Filter. Dictionary selection by which attributes are additionally loaded.
The EnsureValuesLoaded method additionally dynamically loads attributes of dimension elements.
The Option parameter gets values available for DimAttributeInstanceValuesLoadOptions.
Executing the example requires a dictionary with the DIC identifier.
Add links to the Metabase, Dimensions system assemblies.
Sub UserProc;
Var
MB: IMetabase;
Dimen: IDimInstance;
Attrs: IDimAttributesInstance;
Ar: Array Of integer;
Selection: IDimSelection;
i: Integer;
Begin
MB := MetabaseClass.Active;
Dimen := MB.ItemById("DIC").Open(Null) As IDimInstance;
Attrs := Dimen.Attributes;
Ar := New integer[Attrs.Count];
For i := 0 To Attrs.Count - 1 Do
Ar[i] := Attrs.Item(i).Attribute.Key;
End For;
// Set up selection, by which attributes should be loaded
Selection := Dimen.CreateSelection;
Selection.SelectAll;
// Load attributes
Attrs.EnsureValuesLoaded(Ar, DimAttributeInstanceValuesLoadOptions.DisplayValue, Selection);
End Sub UserProc;
As a result of the example execution, attributes of dimension elements will be dynamically loaded.
See also: