Easy way to get file location?
Easy way to get file location?
(OP)
right now at work we are using NX5, but are switching to NX8. Does anyone know of a way to get the file path of the part you have open to display in text. I would also hope that it could be parametric so if you change the location of the file, it updates.





RE: Easy way to get file location?
Have you tried selecting the component and then hitting 'Ctrl-i'?
Now I'm not sure what you mean by "parametric", but the above operation will show you the full path to the part file from which the selected component was opened, period!
John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
http://www.siemens.com/plm
UG/NX Museum: http://www.plmworld.org/p/cm/ld/fid=209
To an Engineer, the glass is twice as big as it needs to be.
RE: Easy way to get file location?
RE: Easy way to get file location?
John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
http://www.siemens.com/plm
UG/NX Museum: http://www.plmworld.org/p/cm/ld/fid=209
To an Engineer, the glass is twice as big as it needs to be.
RE: Easy way to get file location?
You don't remember, but you did it for me 3 years ago with a sample grip programm
So I attached it to this post (change the extension .zipper to .zip and uncompress it)
I checked that file execute grip read_file.grx works well in NX8
Run the programm each time you save the file under another directory and the FILE_SPEC attribute will update.
I hope this help
Regards
Didier Psaltopoulos
http://www.psi-cad.com
RE: Easy way to get file location?
John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
http://www.siemens.com/plm
UG/NX Museum: http://www.plmworld.org/p/cm/ld/fid=209
To an Engineer, the glass is twice as big as it needs to be.
RE: Easy way to get file location?
Or, create an environment variable named USER_RETRIEVE, and for the value enter the path to the grip executable. Now the program will run everytime you open a file; no remembering to run the program.
www.nxjournaling.com
RE: Easy way to get file location?
John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
http://www.siemens.com/plm
UG/NX Museum: http://www.plmworld.org/p/cm/ld/fid=209
To an Engineer, the glass is twice as big as it needs to be.
RE: Easy way to get file location?
for the environment variables. its that in the file ugii_env.dat and if so do I just do something like this. I put the grx file in that location
USER_RETRIEVE=$C:\Program Files\UGS\NX 6.0\UGII\Read_File_Spec.grx
Also how do you edit a grip file? or make one?
RE: Easy way to get file location?
RE: Easy way to get file location?
As for editing a GRIP program, you'll need to use the GRIP editor which can be launched from the Windows Start menu by expanding the NX folder and then the NX Tools folder where you will find the NX Open Grip tool.
John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
http://www.siemens.com/plm
UG/NX Museum: http://www.plmworld.org/p/cm/ld/fid=209
To an Engineer, the glass is twice as big as it needs to be.
RE: Easy way to get file location?
Where you set the variable will depend on how you use/maintain NX and what you want to accomplish.
www.nxjournaling.com
RE: Easy way to get file location?
I copied lines
USER_RETRIEVE="C:\Program Files\UGS\NX 6.0\UGII\Read_File_Spec.grx"
When I open ug with the file, it does not update. When I go to file open, I see the note change. Also if I have no part open and go to open, I get a no active part error. Is this suppose to work like this?
RE: Easy way to get file location?
John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
http://www.siemens.com/plm
UG/NX Museum: http://www.plmworld.org/p/cm/ld/fid=209
To an Engineer, the glass is twice as big as it needs to be.
RE: Easy way to get file location?
From the ugii_env.dat file header for User Exits:
# If these are needed they should be setup by the user. If the user
# exit is a grip program procede the name with an asterisk (*). If
# the user exit is an operating system executable, just give the full
# pathname to the program.
"Wildfires are dangerous, hard to control, and economically catastrophic."
Ben Loosli
RE: Easy way to get file location?
The reason that the USER_RETRIEVE will not work and that the menuscript post action will work is based on the timing of the respective actions.
USER_RETRIEVE executes the custom program before NX opens the part. This allows the custom to completely replace the NX user interface for part selection if desired and potentially explicitly load parts directly or it can execute custom code and then (optionally) have NX perform the OOTB behavior. So, even if the environment variable is defined correctly the grip program would get executed too soon - there would not be a part open yet for it to modify. (Unless a new, more complex, Grip program were created that performed the file selection, the part open, and the attribute creation)
The menuscript "post" action executes once the part file has been opened where the GRIP program will successfully find part file to modify.
HTH, Joe
RE: Easy way to get file location?
Menuscript in the post open would be best and is still automatic.
"Wildfires are dangerous, hard to control, and economically catastrophic."
Ben Loosli