Need one more help on looping through Parts

Hi ,
I need to get a part of tree with node information and loop though the sub tree and get how many levels for that sub tree…

Thanks.
Junish

All of the methods you need to walk the subtree are on the Node class, Node | GoJS API. There are examples of navigating the diagram in many places, including GoJS Collections -- Northwoods Software and Navigation of Graphs.