Returns the number that identifies the default view of a Scenario dimension member.
<HsvScenarios>.GetDefaultView lItemID, plView
Long (ByVal). The member ID of the Scenario dimension member. | |
Long. Returns the number that identifies the scenario’s default view. Some View dimension members are hard-coded into Financial Management. These members are represented by the HFM type library constants listed in View Dimension Member Constants. To get the label for the returned ID, pass the ID to IHsvTreeInfo.GetLabel (for the View dimension). For more information, see GetLabel. |
The following example populates a label control with the default view of the scenario selected in a Combo box control. Note how the ID returned by GetDefaultView is passed to GetLabel.
Dim cScenarios As HsvScenarios, cTreeInfo As IHsvTreeInfo
Dim lScen As Long, sCat As String, lDefView As Long
Dim sDefView As String
Set cScenarios = m_cMetadata.Scenarios
sCat = comboCat.Text
'Set the cTreeInfo variable to the Scenario dimension
Set cTreeInfo = m_cMetadata.Scenarios
lScen = cTreeInfo.GetItemID(sCat)
cScenarios.GetDefaultView lScen, lDefView
'Set the cTreeInfo variable to the View dimension
Set cTreeInfo = m_cMetadata.Views
cTreeInfo.GetLabel lDefView, sDefView
lblDefView.Caption = sDefView