×
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

How to retrieve Created and Modified time of features in the part navigator using NXOpen ?

How to retrieve Created and Modified time of features in the part navigator using NXOpen ?

How to retrieve Created and Modified time of features in the part navigator using NXOpen ?

(OP)
Hello Everyone ,

Can someone help me out with a sample code on how i can retrieve the created and modified time of all the features in the part navigator using NXOpen in NX 7.5?

Thanks and Regards,
Amitabh

RE: How to retrieve Created and Modified time of features in the part navigator using NXOpen ?

At best, the only data stored with a feature is the Date (but not the actual time) that the part was saved which contained the newly created feature as well as the Date (again, not the actual time) that the part was last saved after a modification to a feature took place. While I don't have to exact details on how that data can be extracted from a part file using NX Open, this will be the best that you can do no matter what.

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
Siemens PLM:
UG/NX Museum:

To an Engineer, the glass is twice as big as it needs to be.

RE: How to retrieve Created and Modified time of features in the part navigator using NXOpen ?

(OP)
Thanks John.
Well in that case i am interested in knowing as to how i can retrieve the modified and the created date using NXopen of all the features in the part navigator.

Regards,
Amitabh

RE: How to retrieve Created and Modified time of features in the part navigator using NXOpen ?

Hi

Don't know if you can get the that information directly, but you can use the "theSession.information.displayfeatureinformation()
method and redirect the information window output silently to a temporary file that you then read, parse and delete.

RE: How to retrieve Created and Modified time of features in the part navigator using NXOpen ?

It is possible to do this in two steps.

1. Use a NXOpen function or the equivalent wrapper function to get the part history creation version number and last modified version number for the object

int UF_OBJ_ask_cre_mod_versions
(

tag_t object,
int * creation_version,
int * lastmod_version

)

2. Use the part history to get the dates and time.

int UF_PART_ask_nth_history
(

UF_PART_history_list_p_t history_list,
int index,
char * * program,
char * * user,
char * * machine,
int * version,
int * gmtime

)

Frank Swinkels

RE: How to retrieve Created and Modified time of features in the part navigator using NXOpen ?

(OP)
Thanks Franks , I will try this out and consult you in case i need more clarifications.

Regards,
Amitabh

RE: How to retrieve Created and Modified time of features in the part navigator using NXOpen ?

(OP)
Frank ,

I implemented the wrapper functions as mentioned by you.
But the second wrapper function gives the part history and not the feature history ehich i am actually interested in, can you let me know how can i get the feature history (of all the features in the part navigator)

Regards.
Amitabh

RE: How to retrieve Created and Modified time of features in the part navigator using NXOpen ?

It is correct that the second function give the part history however the first function gives the part creation and last modified version for the particular feature. The code logic is something like this.

For each feature in work part call UF_OBJ_ask_cre_mod_versions
This will return the creation_version (ie the part version when the feature was created)
and return the lastmod_version (ie the part version when the feature was last modified)
Now call UF_PART_history_list_p_t history_list and use creation_version to get gmtime for the
feature creation and call UF_PART_history_list_p_t history list and use lastmod_version to gmtime for the feature last modified.

Hope this helps.

Frank Swinkels

RE: How to retrieve Created and Modified time of features in the part navigator using NXOpen ?

(OP)
Thank you Frank.
This really helped and i am able to get what i had ventured out for.

By the way Wish you a Very Happy New Year.

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