Cancel
Showing results for 
Search instead for 
Did you mean: 

Re: MP(Maintenance Pack) output

Phenom
Phenom

4th try (sorry Smiley Frustrated)

try this :

if {[gets [open $outputFile r]] == {} } {
 exec "[MOM_ask_env_var UGII_ROOT_DIR]\\env_print.exe" -n >$outputFile
    } 

instead of

if { [file exists $outputFile] == 0} {
 exec "[MOM_ask_env_var UGII_ROOT_DIR]\\env_print.exe" -n >$outputFile
 } 

with 'exec' , the file is automatically created even if command is empty

Production: NX11.0.2.7,VERICUT 8.1.2
Development: Tcl/Tk, Gnuplot
www.adgroupe.com

Re: MP(Maintenance Pack) output

Valued Contributor
Valued Contributor

Why so difficultly?

 

set patch_version [string trim [MOM_ask_env_var NX_PATCH]]
MOM_output_literal ";*********** patch_version = $patch_version *************"

 

You will get:

 

;*********** patch_version = NX 10.0.3.5 MP12, 15Dec16.  See Maintenance Pack letter for detailed list of fixes. *************

 

Additional a string-trim function and you have what you want.

Werner
Production: NX12.0.2, FBM | TcUA 11.4.0.6
Development: VB.NET, Tcl/Tk

Re: MP(Maintenance Pack) output

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

NX_PATCH is not a standard NX environment variable, but a custom one. It might have been set through a batch file used to start NX at your site.

Stefan Pendl, Systemmanager CAx, HAIDLMAIR GmbH
Production: NX12.0.2, 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: NX (1876) | AWC 3.4 Preparing: -

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: MP(Maintenance Pack) output

Valued Contributor
Valued Contributor

Thank you mkn...That worked!

 


Kal.

NX 9.0.3.4 MP12 | PB 9.0.3.2 | NX11.0.2.7 MP13 | PB 11.0.2 | VERICUT 7.3.4

Re: MP(Maintenance Pack) output

Valued Contributor
Valued Contributor

Hello.

Just got NX 11.0.2.7 MP2 installed and started testing.  When posting in NX11, it no longer shows the correct NX Version...for some reason it shows NX 9.0.3.4 MP12?

 

Read online that UGII_ROOT_DIR has been obsoleted in NX11...if true...what has it been replaced with?

 

What can I need  to fix the cc so it works for NX11?  Will the fix still work for previous versions (show correct version for NX9)?

 

O0001 (xxxxxxxxxxxxx)
(MACHINE      : xxxxxxxxxxxxxxxxxxxxx)
(PROGRAMMER   : KAL G.)
(DATE         : TUE, OCT 17, 2017 05:07PM)
(NX VERSION   : NX 9.0.3.4 MP12)
(NX POST DATE : THU, SEP 07, 2017 04:06PM )

Thanks.

Kal.

NX 9.0.3.4 MP12 | PB 9.0.3.2 | NX11.0.2.7 MP13 | PB 11.0.2 | VERICUT 7.3.4

Re: MP(Maintenance Pack) output

Phenom
Phenom

@Kal wrote:

Read online that UGII_ROOT_DIR has been obsoleted in NX11...if true...what has it been replaced with? 


replace with :

%UGII_BASE_DIR%\NXBIN

Kal wrote

What can I need  to fix the cc so it works for NX11?  Will the fix still work for previous versions (show correct version for NX9)? 


there may be a better solution , I will do this :

if {[file exists $env(UGII_BASE_DIR)/NXBIN] } {
... Do Something
} else {
... Do Something
}

Hope que ça help

Production: NX11.0.2.7,VERICUT 8.1.2
Development: Tcl/Tk, Gnuplot
www.adgroupe.com

Re: MP(Maintenance Pack) output

Valued Contributor
Valued Contributor
Hello MKN.
I couldn't get this to work; reported it to GTAC & it's been PR'd by development.
Thanks for your help.

Kal.

NX 9.0.3.4 MP12 | PB 9.0.3.2 | NX11.0.2.7 MP13 | PB 11.0.2 | VERICUT 7.3.4

Re: MP(Maintenance Pack) output

Valued Contributor
Valued Contributor

Hello.

Worked w/ GTAC & CAM development, solution below is what worked for us.

Kal.

 

#################################
global mom_ug_version

if { $mom_ug_version == "NX 10.0.3.5" || $mom_ug_version == "NX 9.0.3.4" || $mom_ug_version == "NX 8.5.0.23" || $mom_ug_version == "NX 7.5.5.4" || $mom_ug_version == "NX 6.0.5.3"} {

  exec "[MOM_ask_env_var UGII_ROOT_DIR]\\env_print.exe" -m >$outputFile
  } else {

exec "[MOM_ask_env_var UGII_BASE_DIR]\\NXBIN\\env_print.exe" -m >$outputFile

   if { [gets [open $outputFile r]] == {} } {

     exec "[MOM_ask_env_var UGII_BASE_DIR]\\NXBIN\\env_print.exe" -n >$outputFile
   }
}
#################################
NX 9.0.3.4 MP12 | PB 9.0.3.2 | NX11.0.2.7 MP13 | PB 11.0.2 | VERICUT 7.3.4

Re: MP(Maintenance Pack) output

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

Another ENV that should work (instead of mom_ug_version):

UGII_VERSION

I'm on NX10, and the value is "v10".

 

I believe in tcl ths would be

global env
set test $env(UGII_VERSION)

 

 

Might save you if the wrong MR is installed ;-)

 

Ken

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: MP(Maintenance Pack) output

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

The following is much simpler and works with any MR or MP.

#################################
	scan [string trim [MOM_ask_env_var UGII_VERSION]] "v%d" ugii_version

	if { $ugii_version < 11 } {
		exec "[MOM_ask_env_var UGII_ROOT_DIR]\\env_print.exe" -m >$outputFile
	} else {
		exec "[MOM_ask_env_var UGII_BASE_DIR]\\NXBIN\\env_print.exe" -m >$outputFile

		if { [gets [open $outputFile r]] == {} } {
			exec "[MOM_ask_env_var UGII_BASE_DIR]\\NXBIN\\env_print.exe" -n >$outputFile
		}
	}
#################################

Have fun Smiley Wink

Stefan Pendl, Systemmanager CAx, HAIDLMAIR GmbH
Production: NX12.0.2, 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: NX (1876) | AWC 3.4 Preparing: -

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

Learn online





Solution Information