Returns the member ID of the Value dimension member that represents an entity’s default currency. In other words, this method returns the member ID of the Value dimension member that has been specified for an entity’s DefCurrency attribute.
<HsvEntities>.GetDefaultValueID lItemID, plValueID
Long. Returns the member ID of the Value dimension member that represents the entity’s default currency. |
The following example uses GetDefaultValueID to get the default currency of the entity in the comboEnts combo box control. The example then uses GetLabel to get the name of the currency, and inserts this name into the lblDefCurr label control.
Dim cEntities As HsvEntities, cTreeInfo As IHsvTreeInfo
Dim sEntLabel As String, lValId As Long, sValLabel As String
Dim lEnt As Long
Set cEntities = m_cMetadata.Entities
sEntLabel = comboEnts.Text
'Get the ID of the entity in the combo box
Set cTreeInfo = m_cMetadata.Entities
lEnt = cTreeInfo.GetItemID(sEntLabel)
cEntities.GetDefaultValueID lEnt, lValId
'Get the label of the ID returned by GetDefaultValueID
Set cTreeInfo = m_cMetadata.Values
cTreeInfo.GetLabel lValId, sValLabel
'Insert the currency name in the label control
lblDefCurr.Caption = sValLabel