Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

NX Open question- Tree list 1

Status
Not open for further replies.

nastranuser123

Structural
Joined
Oct 17, 2013
Messages
23
Location
IN
I have created a Tree list through NX Open API's

I am able to get selected nodes from Tree List using API tree_control0->GetSelectedNodes();

I need to get the nodes which are displayed in treelist without selecting i.e., want to get all the nodes displayed in treelist.

Can anyone please help?

 
If I recall correctly the process you have to use is as follows:
[ol 1]
[li]Find the first root node of the Tree using tree.rootNode()[/li]
[li]Ask for the sibling nodes of the first root node using node.nextSiblingNode()[/li]
[/ol]
If you then want to find all nodes you have to recursively do the above for all the root nodes you found, but instead of calling tree.rootNode() call node.firstChildNode(). You can then call node.nextSiblingNode().

I don't think there is a convenience method to just get all the nodes in one go because there is no easy way to represent the hierarchy of nodes.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top