Author Topic: Question about GetTreeSelectedItem  (Read 6869 times)


  • EA User
  • **
  • Posts: 96
  • Karma: +0/-0
    • View Profile
    • Solutions Reality
Question about GetTreeSelectedItem
« on: December 21, 2003, 09:11:06 am »
Hi there,

it may be a silly question but...

what is the Item that I need to pass into this function?

Surely it should be a straight call - GetTreeSelectedItem() as ObjectType.

Please can someone advise on what I should pass to the function as the documentation is not clear on this.

Very many thanks,



  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: Question about GetTreeSelectedItem
« Reply #1 on: December 29, 2003, 06:43:18 am »
Think i have worked this out. This code seems to work anyway. The actual selected object is a in-out parameter, not the return value. The return value is the selected object's type, which you can test and set the object to an appropriate typed variable, should you require.

Someone can correct me if i am wrong.

Public Sub Addin_MenuClick(Repository As EA.Repository, ByVal MenuName As String, ByVal ItemName As String)

   Dim selectedObject As Object
   Dim selectedObjectType As EA.ObjectType
   If (ItemName = COMP_DETAILS_COMMAND) Then
       selectedObjectType = Repository.GetTreeSelectedItem(selectedObject)
       MsgBox selectedObject.Name