Cancel
Showing results for 
Search instead for 
Did you mean: 

NX Properties(version)

Valued Contributor
Valued Contributor

Hello.

In windows, is there any tools availble to check NX file proprties(version ?)  w/o having to open up the .prt file?

eg.

cat.prt -->MB3--> something something--> NXxxx ?

 

 

friendly animals.png

 

Kal.

NX 9.0.3.4 MP12 | PB 9.0.3.2 | NX11.0.2.7 MP7 | VERICUT 7.3.4 + 8.1.5
16 REPLIES

Re: NX Properties(version)

Valued Contributor
Valued Contributor

Hello.

I just came across this vb online...basically drag-drop prt into vb & it pops with NX release(*general)...

*eg. dog.prt shows  "NX part version:9"   

Is there a way to mod the vb so it shows full name "NX part version: NX 9.0.3.4 MP12" ?

 

The MP(Maintenance Pack) output thread contents are applicable here....UGII_ROOT_DIR vs. UGII_BASE_DIR ... Smiley Sad

 

Kal.

sigh.jpg

 

'NX part file version
 
Set objFSO = CreateObject("Scripting.FileSystemObject")
 
If Not objFSO.FileExists(WScript.Arguments(0)) Then
	wscript.echo("Invalid file")
	wscript.quit
End If
 
 
Set objShell = CreateObject( "WScript.Shell" )
Set objEnv = objShell.Environment("Process")
 
	strProgramPath = objEnv("UGII_ROOT_DIR") & "\ug_inspect.exe"
 
	Set objWshScriptExec = objShell.Exec(strProgramPath & " -release " & chr(34) & WScript.Arguments(0) & chr(34))
 
	lineTest = "Release: NX "
	'create object to catch external program's output
	Set objStdOut = objWshScriptExec.StdOut
	Do While Not objStdOut.AtEndOfStream
		strLineTest = objStdOut.ReadLine
		pos = instr(strLineTest, lineTest)
		if pos > 0 then
			NX_version = Right(strLineTest, Len(strLineTest) - Len(lineTest))
		end if
	Loop
	wscript.echo("NX part version: " & NX_version)

 

NX 9.0.3.4 MP12 | PB 9.0.3.2 | NX11.0.2.7 MP7 | VERICUT 7.3.4 + 8.1.5

Re: NX Properties(version)

Gears Phenom Gears Phenom
Gears Phenom
The -full switch will output all the info on the file
I don't know if that will work in the .vb file you posted

You can run ug_inspect from the command line

Start - All Programs - SiemensNX(your version) - Tools - Command Prompt -this will open a DOS window
Enter ug_inspect - full and then the path and file name of the .prt you want info on.

(On my system I can drag and drop the file and it will add in the path and file name)

Hit enter and you have probably more info that you want.

John Joyce, Manufacturing Engineer,
Senior Aerospace Connecticut
www.senioraeroct.com
Production: NX11.0.2.7, Vericut 8.0.3
Development: Tcl/Tk
Testing NX12.0

Re: NX Properties(version)

Valued Contributor
Valued Contributor

Thanks John...that's what GTAC suggested yesterday....

 

Issue is legacy(prior NX11) part files...when user(s) double-click existing .prt file, it gets opened up in the latest NX, in this case NX11, and that causes issues on the CAM(toolpaths go crazy..etc), modeling, drafting...etc.

Is there a way to modify the executable ug_router so it can do 2 things:

1)query prt release, ug_inspect utility...?

2)launch that exact release in which that .prt was last saved in...?

 

Kal.

NX 9.0.3.4 MP12 | PB 9.0.3.2 | NX11.0.2.7 MP7 | VERICUT 7.3.4 + 8.1.5

Re: NX Properties(version)

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

Sounds like (in Windows) you will need to edit the default action for the ".prt" file type.

Point to a .BAT of your creation.

Run the UG_inspect on the .prt & figure out the version of the part

Then start/run the correct UGRAF.exe

Ken Akerboom Sr CAx Systems Engr, Moog, Inc.
Production: NX10.0.3.5 MP16/TC11.2
I'd rather be e-steamed than e-diseaseled


Re: NX Properties(version)

Legend
Legend

As good as it will ever get! Best tool around for these sort of Part/Assy/Version things.

 

https://community.plm.automation.siemens.com/t5/Discussion-Forum-NX-Manufacturing/Converting-Units/t...

Re: NX Properties(version)

Valued Contributor
Valued Contributor

@Ken_A wrote:

Sounds like (in Windows) you will need to edit the default action for the ".prt" file type.

Point to a .BAT of your creation.

Run the UG_inspect on the .prt & figure out the version of the part

Then start/run the correct UGRAF.exe


Ken.

That would work for me...

How do I go about combining UG_inspect+version selection + UGRAF.exe into a single .BAT file?

Started lookin at Gerrit's NX Customization thread....trying to make sense of how it all works...Smiley Sad???

Kal.

NX 9.0.3.4 MP12 | PB 9.0.3.2 | NX11.0.2.7 MP7 | VERICUT 7.3.4 + 8.1.5

Re: NX Properties(version)

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

ASSUMING:

- license file/server ENV is set at OS level

- license bundle already done for you...

 

BAT file does this

- for your newest NX version, set UGII_BASE_DIR and (if needed for that version) set UGII_ROOT_DIR

- run UG_inspect on the part, parse out NX version of the part

- [re]define  UGII_BASE_DIR and (if needed for that version) UGII_ROOT_DIR to the proper version

- start NX ("%UGII_ROOT_DIR%ugraf.exe -<your options>")

 

Note this assumes that all components of an assembly are the same (or older) versions of NX as the assembly file.

If an assembly file is NX10, but someone has re-saved a component in NX 11, the assembly won't open correctly in NX10.

 

 

Ken Akerboom Sr CAx Systems Engr, Moog, Inc.
Production: NX10.0.3.5 MP16/TC11.2
I'd rather be e-steamed than e-diseaseled


Re: NX Properties(version)

Legend
Legend

@Kal ,

Tell me if I do not understand, you want Double-click on the file to open it according to the version of prt file ?

@mkn
Production: NX11.0.2.7,VERICUT 7.3.3
Development: Tcl/Tk, Gnuplot
www.deshors-tiremold.com

Re: NX Properties(version)

Valued Contributor
Valued Contributor
Hello MKN.
That is correct....looking for a script/bat of some sort that would query the prt file using ug_inspect, parse it through the report for the version, and then feed that to the ug_router to open the file...?

Just trying to come with a means-way to maintain legacy .prt files in a timestamp. e.g. dog.prt was last saved using NX 6.0.5.3...then the script/bat open it in that release...

Hopefully that makes sense...


Thanks.
Kal.
NX 9.0.3.4 MP12 | PB 9.0.3.2 | NX11.0.2.7 MP7 | VERICUT 7.3.4 + 8.1.5

Learn online





Solution Information