Siemens_NX_File_Renaming

Siemens NX File Renaming

Welcome to “NX File Renaming” program’s page.

About

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.

Renaming Solidworks file from Windows

“NX File Renaming” 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 was written in Python. GUI of this program was solely designed by the help of ‘Bard’, an AI by Google.

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 15 years 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 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:

Special Notes before Installing the Program

How to Install and Run the program?

You can check this Video tutorial or can go through the following Steps-

  1. Download the files of this repository and save it in your computer
  2. In the downloaded folder there are two “.exe” file and two “.py” file. You can just use the “.exe” files or if you wish to modify the code and build your own “.exe” file from the “.py” file then check the next section.

    exe and py files

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

    Running  Program

  4. 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, you will see that it loaded the renamed file successfuly.

    Browse for NX File

  5. 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

  6. Right click on “shell” and add a new “key”. Give the name of the key “Rename NX File”.

    NX Regedit 1

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

    NX Regedit 2

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

    NX Regedit 4

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

    Right_Click_Function

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

    Rename from Right Click

  11. Now open the related assembly or drawing file, you will see that it loaded the renamed file successfuly.
  12. Done.

Building Your own executable File from Python file

If you find any bug in the program then let me know it by commenting on the program’s github page.