×
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

NXOpen Face Tags: save and call
2

NXOpen Face Tags: save and call

NXOpen Face Tags: save and call

(OP)
Hi! Another question (I guess you are all hating me at this point, with all these questions)..

I built a tool to select a few faces from a part (let's call it example.prt) and to save the Nxopen.face.tag of the selected faces in a txt file.
My idea was to use this file and the TAG contained in it to import the information about the selected faces in a new istance of NX, where i open the same example.prt and call the corresponding faces without the need to redo the whole user selection.

I found out that this method doesn't work because it appears that the TAG change whenever i open for the second time the part. As you can see in the image, on the left there is the list of TAGs of all the faces of the part example.prt (I obtained it using body.getfaces), on the right there is the list of TAGs of the faces that i selected the first time. As you can see there is no correspondance between the two lists. Of course, the part has not been modified, but only closed and re-opened.

Am I doing something wrong or this is normal? Is there a way to save a selection of faces with a more convenient approach?




Thank you.

RE: NXOpen Face Tags: save and call

Tags do not persist between sessions; handles do.
Alternately, if you only have a few faces to process, you could give each face a custom name or attribute and look for the same name or attribute on subsequent runs of your program.

www.nxjournaling.com

RE: NXOpen Face Tags: save and call

(OP)
Thanks! Could you give me a hint on how to use handles?

RE: NXOpen Face Tags: save and call

2
Once you have an object's tag, you can use the .AskHandleOfTag method to get the handle. When you have the handle, you can use .AskTagOfHandle to get the tag of the object in the current session (if it exists).

www.nxjournaling.com

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