GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - nahidmubin/Siemens_NX_File_Renamer: NX File Renamer is an endeavour to automate SIEMENS NX. This Program helps you to rename NX Part File outside of NX and keeps the linked files such as Assembly or Drawing updated. This Program was written in Python. GUI of this program was solely designed by the help of 'Google Bard' and ChatGPT.

BranchesTags
Open more actions menu

Latest commit

 

History

10 Commits
10 Commits

Folders and files

NameName
Last commit message
Last commit date
Tutorial_Pictures
Tutorial_Pictures
 
 
core
core
 
 
gui
gui
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
NX_File_Renamer.exe
NX_File_Renamer.exe
 
 
README.md
README.md
 
 
main.py
main.py
 
 
pyinstaller_build_command.txt
pyinstaller_build_command.txt
 
 

Repository files navigation

Siemens NX File Renamer

Welcome to "NX File Renamer" 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 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. 💪

Special Notes before Installing the Program

  • In order to function this program, the NX file that will be renamed and its related files such as assembly and drawing should be in same folder. Otherwise the program won't find the linked assembly or drawing files. This program is designed in this way to make the process simple. The program could be designed for a whole drive or for whole PC. But this will make the whole process much much slower which is impractical. Morever, the Author of this program follows the convention of keeping all the design files in a same single folder. This makes the design file management task easier. So, the program was designed aligning itself with the convention.

How to Install and Run the program?

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-

  1. Download the files of this repository and save it in your computer

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

    exe and py files

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

    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 in NX, 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:\NX_File_Renamer.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 Renamer" 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

  • Install Python3 on your computer (Python 3.11 Recommended)

  • Install "pywin32" in python. To do that open command prompt and type pip install pywin32 and press enter.

  • Install "pyinstaller" in python. To do that type in the command prompt 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".

    Power Shell

  • 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

    Power Shell

  • Now there will be folder by the name "dist". You will find your executable file there.

  • Follow the installation instruction of previous section to install your exe file.

  • Done

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

About

NX File Renamer is an endeavour to automate SIEMENS NX. This Program helps you to rename NX Part File outside of NX and keeps the linked files such as Assembly or Drawing updated. This Program was written in Python. GUI of this program was solely designed by the help of 'Google Bard' and ChatGPT.

nahidmubin.github.io/Siemens_NX_File_Renamer/

Topics

cadcad-automationdesignnxopenpythonsiemens-nxsolidworks

Resources

Readme
GPL-3.0 license
Activity

Stars

12 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.