GetConsolidationMethodInfo

Returns the attributes of a consolidation method, given the method’s ID.

Note:

To get a consolidation method’s description, use GetConsolidationMethodDescription.

Syntax

<HsvMetadata>.GetConsolidationMethodInfo lConsolMethodID, pbstrLabel, pbUsedByCalcRoutine, pbIsHoldingMethod, psToPercentControlOp, pdToPercentControl, pdPercentConsol, psControl

Argument

Description

lConsolMethodID

Long (ByVal). The consolidation method’s ID.

Tip:

You can get consolidation method IDs with EnumConsolidationMethodIDs.

pbstrLabel

String. The method’s label.

pbUsedByCalcRoutine

Boolean. Returns the method’s UsedByCalcRoutine attribute.

pbIsHoldingMethod

Boolean. Returns the method’s IsHoldingMethod attribute.

psToPercentControlOp

Integer. Returns the method’s ToPercentControlComp attribute. Constants that represent the valid return values are listed in Table 94, tagCONSOLMETHOD_TOPCTCTRLOPS Enumeration.

pdToPercentControl

Double. Returns the method’s ToPercentControl attribute.

pdPercentConsol

Double. Returns the method’s PercentConsol attribute.

Note:

There are predefined values that can be used for this attribute. Constants that represent these predefined values are listed in Table 95, tagCONSOLPCTCONSTANTS Enumeration.

psControl

Integer. Returns the method’s Control attribute. Constants that represent the valid return values are listed in Table 93, tagCONSOLMETHOD_CONTROL Enumeration.

Example

This example inserts a consolidation method’s description for the user’s language into a text box. EnumConsolidationMethodIDs gets the IDs of the application’s consolidation methods. A loop searches these IDs for that of the consolidation method named “M5,” then GetConsolidationMethodInfo returns information for this method. The user’s language is determined by HsvSystemInfo.GetLanguageParameters, and the application’s valid languages are returned by EnumLanguages. A loop searches these languages for the user’s language. The ID of this language is passed to GetConsolidationMethodDescription, and the description returned is inserted into a text box.

Dim vaIDs As Variant, sLabel As String, bCalc As Boolean
Dim bHold As Boolean, iPctControl As Integer, dConsol As Double
Dim iControl As Integer, cSysInfo As HsvSystemInfo
Dim lUserLang As Long, sDesc As String, vaLangIDs As Variant
Dim vaLangDescs As Variant, dPctConsol As Double
m_cMetadata.EnumConsolidationMethodIDs vaIDs
For i = LBound(vaIDs) To UBound(vaIDs)
  m_cMetadata.GetConsolidationMethodInfo vaIDs(i), sLabel, _ 
  bCalc, bHold, iPctControl, dConsol, dPctConsol, iControl
  If sLabel = "M5" Then
    Set cSysInfo = m_cSession.SystemInfo
    cSysInfo.GetLanguageUserParameters lUserLang
    m_cMetadata.EnumLanguages vaLangIDs, vaLangDescs
    For j = LBound(vaLangIDs) To UBound(vaLangIDs)
      If vaLangIDs(j) = lUserLang Then
        m_cMetadata.GetConsolidationMethodDescription _ 
        vaIDs(i), vaLangIDs(j), sDesc
        txtMethDescription.Text = sDesc
        Exit Sub
      End If
    Next j
  End If
Next i
End Sub