Returns arrays of flags that indicate which calculation statuses apply to the specified entities and periods of a subcube. For each specified period, GetCalcStatusStatistics returns an array of two-dimensional arrays.
<HsvData>.GetCalcStatusStatistics(lScenarioID, lYearID, varalPeriodIDs, lValueID, varalEntityIDs, varalParentIDs, vbOBPActiveOnly)
Variant. Returns an array of Long two-dimensional arrays that indicate which calculation statuses apply to any cells that intersect the specified dimension members. Each array of two-dimensional arrays has a one-to-one correspondence with the varalPeriodIDs argument’s array. The two-dimensional arrays contain the following information:
The first dimension is an index that identifies the type of calculation status returned by the second dimension item. Valid values are represented by the HFMConstants enumeration tagCALCSTATUSSTATISTICS, which is described in Calculation Status Types.
The second dimension indicates whether the calculation status applies to one or more of the specified entities. 1 indicates that the status applies, 0 that it does not.
The following subroutine prints to Visual Basic’s Immediate window whether the specified entities contain cells that have calculation statuses of NoData or CN ND.
Sub areEntitiesNDorCNND(lScen As Long, lYear As Long, laPers() As Long, _ lVal As Long, laEnts() As Long, laPars() As Long) Dim vRet As Variant, cData As HsvData, cTreeInfo As IHsvTreeInfo Dim sPeriod As String 'g_cSession is an HsvSession object reference Set cData = g_cSession.Data 'g_cMetadata is an HsvMetadata object reference Set cTreeInfo = g_cMetadata.Periods vRet = cData.GetCalcStatusStatistics(lScen, lYear, laPers, lVal, _ laEnts, laPars, False) For i = LBound(vRet) To UBound(vRet) cTreeInfo.GetLabel laPers(i), sPeriod Debug.Print sPeriod + " period:" Debug.Print " NoData: " + CStr(vRet(i, CALCSTATUS_STATSCOL_NODATA)) Debug.Print " CN ND: " + CStr(vRet(i, CALCSTATUS_STATSCOL_CNND)) Next i End Sub