Translate

Translates an entity’s data from one currency to another for the specified Scenario, Year, Period, and Value dimension members.

Tip:

Translate uses the default exchange rates defined for an application. If an application has a translation rule, Translate executes the rule instead of applying the default exchange rates.

Syntax

<HsvCalculate>.Translate lScenario, lYear, lPeriod, lEntity, lParent, lValue, varbForceTranslate, bTranslateAll

Argument

Description

lScenario

Long (ByVal). The member ID of the Scenario dimension member.

lYear

Long (ByVal). The member ID of the Year dimension member.

lPeriod

Long (ByVal). The member ID of the Period dimension member.

lEntity

Long (ByVal). The member ID of the Entity dimension member for which the consolidation is to be run.

lParent

Long (ByVal). The member ID of the parent entity of the lEntity argument’s entity.

lValue

Long (ByVal). The member ID of the Value dimension member for the currency into which the amount is to be translated.

varbForceTranslate

Boolean (ByVal). Determines whether translations will be forced. Specify TRUE to force translations, otherwise FALSE.

Tip:

Specifying TRUE is analogous to Financial Management’s Force Translate command.

bTranslateAll

Boolean (ByVal). This argument has no effect in the current release. You must pass a value, but the value is ignored.

Example

This example translates the Italy entity’s amount to the USD currency. The dimension members’ labels are passed to the user-defined GetMemberID function, which returns their member IDs. (For information on GetMemberID, see the example for GetItemID.) These member IDs are then passed to Translate.

Dim lScen As Long, lYear As Long, lPer As Long
Dim lEnt As Long, lPar As Long, lVal As Long
Dim cCalculate As HsvCalculate
lScen = GetMemberID(DIMENSIONSCENARIO, "Actual")
lYear = GetMemberID(DIMENSIONYEAR, "2000")
lPer = GetMemberID(DIMENSIONPERIOD, "July")
lEnt = GetMemberID(DIMENSIONENTITY, "Italy")
lPar = GetMemberID(DIMENSIONENTITY, "Europe")
lVal = GetMemberID(DIMENSIONVALUE, "USD")
Set cCalculate = m_cHsvSession.Calculate
cCalculate.Translate lScen, lYear, lPer, lEnt, lPar, lVal, _ 
False, False