Forum Discussion

rushikesh's avatar
rushikesh
Contributor
8 years ago

Problem in expanding Tree items.

Refer the attached snap shot.

I am using below code

 

function SelectSWFeature(itemTypeNo)
{

SelectSWFeatureTree()
FeatureManagerTree.ExpandItem("|[0]|[1]|[itemTypeNo]|");

}

 

 

When itemTypeNo = 0.
It expands "Faces".

 

Now after this, state shown in snap shot,when itemTypeNo = 1.
It fails to expand "Edges"

 

Where I am going wrong ?

  • baxatob's avatar
    baxatob
    8 years ago

    I think that after you have expanded the item with index 0, all other items were re-indexed. 

    Try to run itemTypeNo = 3 after expanding the "Faces"

    If it will expand the "Edges", you need to find another way of addressing to the tree items, e.g. by name.

  • baxatob's avatar
    baxatob
    Community Hero

    What happens if you use itemTypeNo = 1 as the first step? Would it expand the "Edges"?

      • baxatob's avatar
        baxatob
        Community Hero

        I think that after you have expanded the item with index 0, all other items were re-indexed. 

        Try to run itemTypeNo = 3 after expanding the "Faces"

        If it will expand the "Edges", you need to find another way of addressing to the tree items, e.g. by name.