Welcome to “NX File Renamer” program’s page.
If a NX file is renamed from Windows then the links between the renamed file and it’s assemblies or drawing will be broken. There is a way to rename a NX file from Windows without breaking the links but it is really difficult. Where as it is very simple to do incase of a Solidworks file. You just right click on a solidworks file then rename the file using solidworks context menu. If you rename a solidworks file in this way every part, assembly and drawing file linked to this renamed file will be updated automatically and no link will be broken.

“NX File Renamer” is an endeavour to automate SIEMENS NX which makes the file renaming easy just like that of Solidworks. This Program renames a NX file from Windows and keeps the linked files such as Assemblies or Drawings updated.
This Program is written in Python. GUI of this program is solely designed by the help of ‘Google Bard’ (now known as Gemini) and ‘ChatGPT’.
To make this program real, initial advise from the owner of “NX Journaling” was crucial to create the layout of the project. Please visit this excellent site, there are lots of NX journals which may make your CAD works easier, smoother and faster.
Secondly, This decades old blog post “Renaming components outside of NX” by Hakan Sonmezler, was the essence of this program. Actually, this program just automates the things that were mentioned in the blog post. Check out his blog site. There are many gems yet to be explored.
If you need any NX related help you may visit this site ENG-TIPS: Siemens NX. Many NX veterans actively participates in this forum. :muscle:
You can check this Video tutorial (Note that lot a of contents have been changed since the video was recorded) or can go through the following Steps-
In the downloaded folder there is a “NX_File_Renamer.exe” file. You can just use this “.exe” file or if you wish to modify the code and build your own “.exe” file from the “.py” files then check the next section.

Copy or Move the “NX_File_Renamer.exe” in a suitable place. Let’s say put it in C Drive. Now Double click on “NX_File_Renamer.exe” and run it.

Press Browse button and browse for the NX file that you want to Rename. Add a new name and press OK button. Your NX file will be get renamed. Now open the related assembly or drawing file in NX, you will see that it loaded the renamed file successfuly.

Now to rename a NX file by right clicking on the file, windows registry need to be edited. Press ‘Win’ + R and type ‘regedit’. Click OK to open the registry editor and Navigate to HKEY_LOCAL_MACHINE > SOFTWARE > Classes > NXPartFile > shell
Right click on “shell” and add a new “key”. Give the name of the key “Rename NX File”.

Again, Right click on “Rename NX File” and add a new “key”. Give the name of the key “command”.

Double click on the “Default” and Type "C:\NX_File_Renamer.exe" "%1" with the double quotes included in the “Value data” field. Press OK.

Now, Right Click on the NX file that you want to rename and then click “Rename NX File”.

“NX File Renamer” program will be loaded with the file name. Now just Add a new name and Press OK.

pip install pywin32 and press enter.pip install pyinstaller and press enter.Now open your downloaded folder. Go to the folder where all the files and folders are located. Press Shift + Right click in the empty space of the folder and click “Open PowerShell Window here”.

Type the following code in the power shell and Press Enter. Wait for the process to be completed.
pyinstaller main.py --name NX_File_Renamer --onefile --noconsole --add-data "gui/assets;gui/assets" --hidden-import win32com
