Analysis Services Programming
GetObject (IOlapAddIn Interface)
The GetObject method of the IOlapAddIn interface responds to a request that your add-in return a reference to the object that is represented by an OlapTreeNode object.
Syntax
Function GetObject(LinkedNode As OlapTreeNode) As Object
LinkedNode
The OlapTreeNode object to be linked with an object.
Remarks
An OlapTreeNode object can have other objects linked to it. The GetLinkedObject method of the OlapTreeNode object can be used to retrieve these linked objects.
Example
The following example retrieves an item from the OlapTreeNodes collection:
'm_MyObjects is a collection of objects that are represented
'in the Analysis Manager tree pane as members of the OlapTreeNodes
'collection. Your add-in will need to populate this
'collection with objects.
Private m_MyObjects As New Collection
Private Function IOlapAddIn_GetObject( _
LinkedNode As DSSAddInsManager.OlapTreeNode) As Object
On Error Resume Next ' Handle error when it happens
Set IOlapAddIn_GetObject = m_MyObjects(LinkedNode.Caption)
If Err Then Err.Clear 'Item was not found in the collection
End Function