ProvideChildNodes (IOlapAddIn Interface)

Analysis Services Programming

Analysis Services Programming

ProvideChildNodes (IOlapAddIn Interface)

The ProvideChildNodes method of the IOlapAddIn interface adds nodes under existing nodes to the Analysis Manager tree pane.

Syntax

Sub ProvideChildNodes(ParentNode As OlapTreeNode, OlapTreeNodes As OlapTreeNodes)

ParentNode

The OlapTreeNode object that is currently selected or being expanded in the tree pane display.

OlapTreeNodes

An empty collection of OlapTreeNode objects. The add-in populates this collection with the child OlapTreeNode objects to be created under ParentNode.

Remarks

This method responds to a request that the add-in populate an OlapTreeNodes collection. This collection is made of nodes that belong to the OlapTreeNode object that is currently selected or being expanded. Your add-in uses this method to add nodes to the tree pane. An add-in uses this method only if it needs to add OlapTreeNode objects to the tree pane.

Example

The following code illustrates how to use this method to add a node to the OlapTreeNodes collection based upon the caption of the parent node:

'Declarations
Private Enum SampleIcons 'Icons for tree nodes
  icoForm1 = 1
  icoForm2
End Enum
'Other code

Private Sub IOlapAddIn_ProvideChildNodes( _
    ParentNode As DSSAddInsManager.IOlapTreeNode, _
    TreeNodes As DSSAddInsManager.OlapTreeNodes)
  On Error GoTo pc_Err 'Handle errors
  If ParentNode.Caption = "Analysis Servers" Then
    TreeNodes.Add "Sample Form1", icoForm1
  Else
    TreeNodes.Add "Sample Form2", icoForm2
  End If
  Exit Sub
pc_Err:
  MsgBox "ProvideChildNodes Failed"
  Err.Clear
End Sub
 

See Also

IOlapAddIn Interface