Eng-Tips is the largest forum for Engineering Professionals on the Internet.

Members share and learn making Eng-Tips Forums the best source of engineering information on the Internet!

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

Filename Extraction

Status
Not open for further replies.

2_BIG

Automotive
Joined
Mar 19, 2025
Messages
2
I am currently extracting a portion of the filename and use it in the text function. The purpose of this is in the filename there is an ID that will be engraved on the detail. On some jobs we will clone the assembly and change this ID. Currently we have to go in and manually change this ID so I used first(splitstring(last(splitstring(ug_askcurrentworkpart();"-"));"_")) to extract the protion of the filename I want. It works great until you change the filename. When the filename changes it doesn't update the Text. I have done some digging and all I can find is to use the Tools > Update > Update for External Change. This works but I would like to eliminate this step. Everything I have found so far is from older versions of NX (I am on NX12) and it sounds like they made some changes in NX 8 with respect to an Expression referencing an Attribute, you no longer have to depend on using KF routines but rather the user now has a direct Attribute function in the Expression tool which will update like any other Expression edit. Problem is I am new to all of this and I don't know how to utilize this. Is there another formula I can use to extract a part of a filename and have it update automatically? Any help would be appreciated.
 
To the best of my knowledge, the ug_askcurrentworkpart function still requires the "update for external change" to force the update.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top