Returns an array containing the member IDs of a frequency’s Period dimension members.
<HsvPeriods>.GetPeriodsInFrequency lFrequency, pvaralPeriodIDs
The following example creates a function named CheckPeriodsInYear that returns a count of the periods in an application’s base frequency. GetBaseFrequency gets the ID of the base frequency; this ID is then passed to GetPeriodsInFrequency. The returned array of period IDs is passed to UBound; since this is a zero-based array, 1 is added to the number returned by UBound to calculate the count of periods, and the sum is set as CheckPeriodsInYear’s return value.
Function CheckPeriodsInYear() As Long Dim cTreeInfo As IHsvTreeInfo, cPeriods As HsvPeriods Dim lFreqID As Long, vaPeriods Set cTreeInfo = m_cMetadata.Periods Set cPeriods = m_cMetadata.Periods cPeriods.GetBaseFrequency lFreqID cPeriods.GetPeriodsInFrequency lFreqID, vaPeriods CheckPeriodsInYear = UBound(vaPeriods) + 1 End Function