NX Open question- Tree list
NX Open question- Tree list
(OP)
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?
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?





RE: NX Open question- Tree list
- Find the first root node of the Tree using tree.rootNode()
- Ask for the sibling nodes of the first root node using node.nextSiblingNode()
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.
RE: NX Open question- Tree list