GetAttributeValue

Returns the value that has been assigned to a given metadata attribute of a dimension member.

Tip:

To return the value assigned to a member’s Description attribute, use GetMemberDescription.

Syntax

<HFMwDimension>.GetAttributeValue (lMemberID, iAttribute)

Argument

Description

lMemberID

The member ID of the dimension member.

Input argument. Long subtype.

iAttribute

The ID of the metadata attribute. Valid values are represented by the HFMConstants type library constants listed in the following topics:

Input argument. Integer subtype.

Return Value

Returns the value of the specified metadata attribute.

Example

The following function takes the label of an Entity dimension member and returns the label of the entity’s DefCurrency attribute. GetAttributeValue returns the ID of the Value dimension member set as the DefCurrency attribute, and this ID is then passed to GetMemberLabel.

Function GetEntDefaultValue(sEnt)
Dim cHFMMetadata, cHFMEnt, cHFMDimScen, cHFMVal
Dim cHFMDimVal, lScenId, lValId
' cHFMSession is a previously set HFMwSession object
Set cHFMMetadata = cHFMSession.metadata
Set cHFMEnt = cHFMMetadata.entities
Set cHFMVal = cHFMMetadata.values
Set cHFMDimScen = cHFMEnt.dimension
lId = cHFMDimScen.GetMemberID(sEnt)
lValId = cHFMDimScen.GetAttributeValue(lId, _ 
   ATTRIB_ENTITY_DEFAULT_VALUE_ID)
Set cHFMDimVal = cHFMVal.dimension
GetEntDefaultValue = cHFMDimVal.GetMemberLabel(lValId)
End Function