Forum Discussion

lokithorshield's avatar
lokithorshield
Contributor
10 years ago

Traverse a Tree in Find Object

Hi I need help to traverse to a particular object in a single find command. the name mapping does it but in case movable panels are at run time i need to put forth find parameters like this

 

1. Parent - some_Object.Find*([prop name ],[value],x,x,x)

2. ... some object 2

3. ... some object 3

4. Final objhect = some object 3.Find ( Something);

 

Its very important for us and very very often used ones. where even condirtional name mapping is not helpfull.

 

As of now I am doing a loop to no of parents and repeat find.

 

Thanks,

Mahesh

  • Expecting something like

     

    find [parent prop name1 ][parent prop val 1 ], [parent prop name2 ][parent prop val 1], [final object prop nam][final object prop val]

    • scsvel's avatar
      scsvel
      Frequent Contributor

      Not sure what you are expecting. If you want to access objects in the child levels, you can use depth. If you have unique properties, then you can do by passing DEPTH.

       

      someParent.Find(PropName1, PropVal1, Depth)

       

      For Ex: Your object is in 3rd sub level from your parent; (You can see the hierarchy using Object Explorer)

      -- 3rdParent

              --- 2ndParent  (1st sub level)

                  --- 1stParent  (2nd sub level)

                      --- yourObject (3rd sub level)

      3rdParent.Find(PropName1, PropVal1, 3)

       

      Based on the DEPTH you are passing, FIND will search up to that level using the passed properties/values.

      • lokithorshield's avatar
        lokithorshield
        Contributor

        I am not trying to give  a depth. Depth in this case is Extended find. Such extended finds in complex Dojo/Angular applications take uptoi 20 30 minutes to just find a single object with good enough name mapping of frame also.

         

        I need to recursively select parents and thus the final child. So I am trying to give parents property names and property values in the find .