Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Idea for Renaming a NX file from Windows 5

Status
Not open for further replies.

Nahid Mubin

Mechanical
Mar 24, 2023
15
0
0
BD
Renaming a NX file is really difficult. Where as it is very is to rename a solidworks file from Windows. You can right click on a solidworks file then rename the file solidworks conext menu (See the picture below).

Screenshot_2023-08-17_111013_gfqngb.png


If you rename through this process every part, assembly and drawing file connected to this renamed file, even if it hundreds or thousands, will be updated automatically and no link will be broken. So, I am thinking to develop such an option for Siemens NX. So, the process will be-

1. To Make a windows right mouse "NX" context menu which will provide a rename option
2. When a NX file will be renamed a (Python) Program/Journal will be run.
3. The program/Journal will collect all the files connected to this renamed file.
4. The program/Journal will Update the links of all the connected files.

But I don't have idea how to do this, specially for point 3 and 4. Can anyone give me some idea or advise how to do that?
 
Replies continue below

Recommended for you

That tool is just a link to Solidworks Explorer. It is written by people who have the direct access ability to read and change data inside of Solidworks files. In order to not have to completely read and write the file unless Solidworks has an addendum function for applying corrections.

Yes, #3 and #4 are the tricky part aren't they.

It may be that Solidworks is keeping a stash of names and where-used for reference. It would be disaster to store the referenced-by information in the files, but maybe?

Try a text editor to open the files to see if the reference info is there.
 
A given part file does not know anything about the parts that reference it. An assembly stores information about its components, as it must, but the components do not store anything about the assembly. Interactive NX has a "where used" function (NXOpen equivalent: WhereUsedReport) that can tell you which parts reference a given part. You must specify a search location and it will open each part (in the background) and search for references to the target part. This process can be painfully slow, even with a small number of parts.

NX ships with a number of command line utilities that might also be of help in this quest. ug_inspect.exe can tell you if a part has component data, interpart expressions, and if it has wave link data, but won't give many details. ugpc.exe will give you details on the components a file references. ug_edit_part_names.exe can also give some info on components. Custom code will probably be required to query wave link data.

I think what you are asking is possible, but difficult. Execution time may not be practical unless you can narrow down the search to a handful of files to check.

www.nxjournaling.com
 
No different than Creo, the main executable for Pro/Engineer, Wildfire and Creo has always been xtop.exe.

One thing not mentioned is if the Solidworks rename command works on all files or only those stored in the Solidworks Explorer database. Does the rename work on files that are stored in a native windows folder? Can Solidworks find a file that has been moved to another native folder?
With native filing, Creo and NX both rely on search paths to find component parts of an assembly not in the same folder as the assembly.

"Wildfires are dangerous, hard to control, and economically catastrophic."

Ben Loosli
 
With Pro/E I could rename references in assembly files until they encrypted the files to keep the former PTC employee from copying the format for use in SolidWorks. This was the main driver for Intralink as there were too many users naming parts "PLATE" and "NUT" and thinking they could just rename them and fix it all.
 
Status
Not open for further replies.
Back
Top