×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

NX Open question- Tree list

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?

RE: NX Open question- Tree list

If I recall correctly the process you have to use is as follows:
  1. Find the first root node of the Tree using tree.rootNode()
  2. 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

(OP)
Thank you very much, that was evry useful..

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources