Showing results for 
Search instead for 
Do you mean 
Reply
Solved! Go to solution

Runtime error : SCRIPT_INVOKE for run_journal.exe

 

I have been using VB script and run_journal.exe in batch mode to dump the expression in a model. It works well for 8.5 and 9.0.

 

But the same script doesn't work anymore. It complained with error message :

Runtime error

SCRIPT_INVOKE

 

So I did a test.

I export the expression in a model  through GUI, and record the process to a VB journal (journal.txt).

 

I then play the journal back in GUI. It works fine.

 

But later when I run it through the following command line in batch mode

"C:\Program Files\Siemens\NX 10.0\UGII\run_journal.exe" journal.txt

 

It gave me the following error message

Runtime error:

SCRIPT_INVOKE

System.IndexOutOfRangeException : index outside array range.

  NXopen.Utilities.Script.Run(String[] args, Boolean witiUI)

 

Anyone knows what did I do wrong here ?

 

Any help will be greatly appreciated.

 

Rgards

Chen

14 REPLIES
Solution
Solution
Accepted by topic author SYChen
‎08-26-2015 04:32 AM

Re: Runtime error : SCRIPT_INVOKE for run_journal.exe

 

I was able to run your journal using run_journal.exe in NX10. Of course it died on line 19, because it could not find "D:\DISK0001\WORKSP\examp041.prt", but I got the appropriate error for that.

 

 

Are you running in an NX Command Prompt from the NX Tools menu?  If not, please try that.

 

In any environment where you have multiple versions of NX available, it is always important to make sure that the environment variables in your shell are defined for the version you want to use.  In particular, check UGII_BASE_DIR, UGII_ROOT_DIR and PATH.  Make sure that the first two are pointing to the appropriate folders for NX10, and make sure in PATH that the ...\UGII folder for NX10 appears in the definition BEFORE the ugii folder for any other versions.

 

Using the NX Command Prompt is an easy way to make sure you have the right variables defined.

 

Re: Runtime error : SCRIPT_INVOKE for run_journal.exe

The probelm was resolved by re-installing NX 10.0, with "typical" option.

 

Thanks again for the help.

 

Regards

Chen

Re: Runtime error : SCRIPT_INVOKE for run_journal.exe

Dear Chen,

 

this issue was found to be caused by a missing "LINE_DESIGNER" folder in NX10, see PR-7525125 for details:
---
The command tool %UGII_BASE_DIR%\UGII\run_journal.exe fails with a  System.IndexOutOfRangeException in case the %UGII_BASE_DIR%\LINE_DESIGNER folder is missing.
The Line Designer is an optional product and may be dismissed by a custom installation.

 

When hitting this issue, the following output is received from a NX command prompt:
 Runtime error:
 SCRIPT_INVOKE
 System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at NXOpen.Utilities.ScriptHost.Run(String[] args, Boolean withUI)

 

Note that just renaming the LINE_DESIGNER folder will NOT lead to this error as NX still finds the subfolders by other mechanisms.
To see the error, the LINE_DESIGNER folder must be deleted or moved to a foreign location.
---

 

So re-installing NX10 with 'Typical' option fixes the issue because the LINE_DESIGNER folder is now available.
As a workaround, you may also simply copy that folder from another installation to your UGII_BASE_DIR.

 

Regards,
Frank

Re: Runtime error : SCRIPT_INVOKE for run_journal.exe

Just curious...

Are there plans to fix NX so it works correctly if Line Designer is not installed?

 

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


Re: Runtime error : SCRIPT_INVOKE for run_journal.exe


Ken_A wrote:

 

Just curious...

Are there plans to fix NX so it works correctly if Line Designer is not installed?

 


Yes, that's the purpose of a Problem Report Smiley Happy

Re: Runtime error : SCRIPT_INVOKE for run_journal.exe

Having the PR filed is one thing.

Getting Siemens to actually fix it is (sometimes) a completely different thing.

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


Re: Runtime error : SCRIPT_INVOKE for run_journal.exe

"check UGII_BASE_DIR, UGII_ROOT_DIR and PATH. Make sure that the first two are pointing to the appropriate folders for NX10" what does "appropriate folders" means?

Re: Runtime error : SCRIPT_INVOKE for run_journal.exe

The answer depends on where NX10 was installed on your system, but it is not hard to find this information.

 

Start a session of NX.  Select Help -> Log File, and the syslog should open in the Info window.

 

Select Edit -> Find, and search for UGII_BASE_DIR.  It will probably find it first under a heading called System Environment Variables.  UGII_ROOT_DIR should appear a few lines below, but search for it too if necessary.  It should be defined as the ugii folder right under the base dir.

Re: Runtime error : SCRIPT_INVOKE for run_journal.exe

Thanks for the reply but I kindly request more help.
Here below, the part of the log file is shown. "UGII_BASE_DIR" is shown but I did not understand if everything is ok.

................................
.........................................************** System Environment Variables **************
PATH C:\Program Files\Siemens\NX 8.0\ugii;C:\ProgramData\Oracle\Java\javapath;c:\Program Files (x86)\Intel\iCLS Client\;c:\Program Files\Intel\iCLS Client\;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;c:\Program Files (x86)\Hewlett-Packard\HP Performance Advisor;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\NUMECA_SOFTWARE\Fine89_3\bin;C:\NUMECA_SOFTWARE\Fine89_3\libx86_64;C:\NUMECA_SOFTWARE\AutoGrid89_3\bin;C:\NUMECA_SOFTWARE\AutoGrid89_3\libx86_64;C:\Program Files\MATLAB\MATLAB Compiler Runtime\v717\runtime\win64;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\Enterprise Vault\EVClient\x64\;C:\Users\metinm\AppData\Local\Programs\Python\Python36-32\Scripts\;C:\Users\metinm\AppData\Local\Programs\Python\Python36-32\
PATHEXT .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
TCVIS_ENABLE_AERO True
TEMP C:\Users\metinm\AppData\Local\Temp
TMP C:\Users\metinm\AppData\Local\Temp
UGII_BASE_DIR C:\Program Files\Siemens\NX 8.0
UGII_CUSTOM_DIRECTORY_FILE C:\Users\metinm\AppData\Roaming\Ansys\v150\Unigraphics\custom_dirs.dat
UGII_LANG english
UGII_ROOT_DIR C:\Program Files\Siemens\NX 8.0\ugii\
UGS_LICENSE_BUNDLE ADVDES;DESIGNER