Cancel
Showing results for 
Search instead for 
Did you mean: 

Registry entries for opening prt file in an Explorer window.

Hello All,

I searched the knowledge base about this but to no avail.  I recently installed a NX Manufacturing EAP version which took over double clicking prt files to open them, which is understandable.  However when I edited the file association to open with NX 12.0, it now starts NX 12.0 but does not display the prt file.

 

My program path for the default program is:

"C:\Program Files\Siemens\NX 12.0\NXBIN\ugs_router.exe" -ug -use_file_dir "%1"

 

I looked at all my registry entries containing ugs_router.exe and I also tried using using -version=V30.0

 

Any ideas why the prt is not displaying?

NX 12.0.2
8 REPLIES 8

Re: Registry entries for opening prt file in an Explorer window.

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

See the command-line switches for ugraf.exe in the NX help.

It is not possible to associate NX through regular Windows procedures with a file type, you will always have to edit the registry directly.

Stefan Pendl, Systemmanager CAx, HAIDLMAIR GmbH
Production: NX10.0.3, VERICUT 8.2, FBM, MRL 3.1.7 | TcUA 10.1 MP7 Patch 0 (10.1.7.0) | TcVis 11.4
Development: C (ITK), .NET, Tcl/Tk Testing: NX12.0 | AWC 3.4 Preparing: NX12.0

Employees of the customers, together we are strong Smiley Wink
How to Get the Most from Your Signature in the Community
NX Customization - Best Practice Guide

Re: Registry entries for opening prt file in an Explorer window.

Yes, that is what I am asking, if anyone knows what keys to edit in the registry to remedy this issue.  The EAP install took it over so I believe I can change it back by editing a registry key.  I will call GTAC if I cannot fix it by the end of the day.

NX 12.0.2

Re: Registry entries for opening prt file in an Explorer window.

Pioneer
Pioneer

Look in HKEY_CLASSES_ROOT.

 

The .prt entry is probably set to UGpartfile. So then go to the UGparfile entry. That entry probably has something like the following...

 

UGpartfile > Shell > Open > Command

 

And the data in Command is what runs when you double click a .prt file.

 

You want this to be "<path to ug launcher or .bat>" <options> "%1"

 

Hope that helps.

Re: Registry entries for opening prt file in an Explorer window.

Update:

I spoke with GTAC about this issue and we checked all the pertinent registry keys we could think of but to no avail.  I had to reinstall NX to restore the double click to open functionality. 

 

However there is a caveat.  Double click to open is working only if NX is already running.  If not, the part file opens in another verson of NX which is an EAP version.  I suspect this version is a non-standard install and is the source of my issue.  Lesson learned...next time the EAP version gets installed on a test box. 

NX 12.0.2
Highlighted

Re: Registry entries for opening prt file in an Explorer window.

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

If you use "Open with ... => Always open with selected application" a registry entry is created for the executing user only.

It highly depends on how the OP has associated the part files with NX 12.0

Due to the mandatory command-line switch "-retrieve:%1" needed to open a part file with ugraf.exe, it is impossible to use regular Windows procedures to associate NX part files.

Associating NX part files with ugs_router also needs command-line switches to specify the correct NX release.

You will have to delete any association of ".prt" under HKEY_CURRENT_USER too, to make sure the system-wide association is used.

You can check the file association with the following DOS command:

assoc .prt

The output might look like:

.prt=UGpartfile

Use the part after the equal sign to get further information with the following DOS command:

ftype UGpartfile

The output might look like:

UGpartfile="G:\Program Files\Siemens\NX 12.0\NXBIN\ugs_router.exe"  -ug -use_file_dir  "%1"

The above resembles the default file association created by the NX installer.

I use the following DOS commands to associate part files with NX 12.0 as default:

REM set context menu item
REG ADD "HKCR\UGpartfile\shell\open_with_NX120" /ve /d "Siemens NX 12.0" /f

REM set open action
REG ADD "HKCR\UGpartfile\shell\open_with_NX120\command" /ve /d "\"%UGII_BASE_DIR%\NXBIN\ugs_router.exe\" -ug -use_file_dir -version=V30.0 \"%1\"" /f

REM set default open action
REG ADD "HKCR\UGpartfile\shell" /ve /d "open_with_NX120" /f

The value for the version parameter for ugs_router depends on the values of key "HKEY_LOCAL_MACHINE\SOFTWARE\Unigraphics Solutions\Installed Applications", remove "Unigraphics V" from the value name and you get the version parameter value.

With the above it is easy to create a context menu entry for all NX releases installed if you use something like "open_with_NX100", "open_with_NX110", etc., and the corresponding version value.

Stefan Pendl, Systemmanager CAx, HAIDLMAIR GmbH
Production: NX10.0.3, VERICUT 8.2, FBM, MRL 3.1.7 | TcUA 10.1 MP7 Patch 0 (10.1.7.0) | TcVis 11.4
Development: C (ITK), .NET, Tcl/Tk Testing: NX12.0 | AWC 3.4 Preparing: NX12.0

Employees of the customers, together we are strong Smiley Wink
How to Get the Most from Your Signature in the Community
NX Customization - Best Practice Guide

Re: Registry entries for opening prt file in an Explorer window.

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

@Mould_United wrote:
However there is a caveat.  Double click to open is working only if NX is already running.  If not, the part file opens in another version of NX which is an EAP version.

If no NX is running the one of the ugs_router executable is used.

To redirect to a dedicated NX release you need to use the version parameter of ugs_router.

Stefan Pendl, Systemmanager CAx, HAIDLMAIR GmbH
Production: NX10.0.3, VERICUT 8.2, FBM, MRL 3.1.7 | TcUA 10.1 MP7 Patch 0 (10.1.7.0) | TcVis 11.4
Development: C (ITK), .NET, Tcl/Tk Testing: NX12.0 | AWC 3.4 Preparing: NX12.0

Employees of the customers, together we are strong Smiley Wink
How to Get the Most from Your Signature in the Community
NX Customization - Best Practice Guide

Re: Registry entries for opening prt file in an Explorer window.

Hello Stefan,

The string you stated that is the default file association created by the installer is exactly what I have. I am a bit puzzled why the behavior is different depending on if NX is running or not but at this point I am satisfied with how it is working.  Everything that has been discussed in this thread has worked in the past when dealing with production releases of NX but I think the EAP version is doing things a bit differently. At any rate thank you for your input. Smiley Happy

NX 12.0.2

Re: Registry entries for opening prt file in an Explorer window.

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

I also have the EAP release installed and there is no problem launching a part file in any of the installed NX releases from the Explorer context menu.NxPartExplorerContextMenu.PNGExplorer Context Menu of NX Part File

All these context menu entries are created with the "REG ADD" commands as shown in the previous post.

In this case the entries "Öffnen (Open)" and "Siemens NX" will launch NX 1847 EAP since it was installed last.

Stefan Pendl, Systemmanager CAx, HAIDLMAIR GmbH
Production: NX10.0.3, VERICUT 8.2, FBM, MRL 3.1.7 | TcUA 10.1 MP7 Patch 0 (10.1.7.0) | TcVis 11.4
Development: C (ITK), .NET, Tcl/Tk Testing: NX12.0 | AWC 3.4 Preparing: NX12.0

Employees of the customers, together we are strong Smiley Wink
How to Get the Most from Your Signature in the Community
NX Customization - Best Practice Guide