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

Run Journal through command prompt

Hello, I am looking to try and run a journal with command prompt. I have referred to the documentation on how to do this, however I am not having success.

The following is the format that I am using. I am not exactly sure if it is correct though:

"run_journal -pim=yes -u=username -p=password  CSmiley TongueathToFile\File.vb -args @db/12345/A"

 

It keeps telling me "more than one argument specified"

 

 

9 REPLIES

Re: Run Journal through command prompt

Does the path to the file have blanks in it?  If so, is it quoted?

i.e.
"C:\Path To File\whatever.vb" 

not
C:\Path To File\whatever.vb
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: Run Journal through command prompt

Okay, I actually tried running it with the quotation marks around the file path. I didn't get the same message "More than one argument specified", rather it produced "failed to initialize UFUN 949985". Which, to me seems like I a step in the right direction.

Re: Run Journal through command prompt

Are you running from a command window with the necessary NX environment variables fully defined?

 

The easiest way to ensure this is Start, All Programs, Siemens NX xx, NX Tools, Command Prompt

 

Re: Run Journal through command prompt

My CMD window says the MSVCDir enviornment variable is not defined. The variable is necassary when using uflink or starting Studio from this Window. You must modify the ufvars.bat file to define this.

Re: Run Journal through command prompt

[ Edited ]

I found I had to add the 2 lines to my batch file before the runjournal line to get a journal to run managed.

 

set TC_ROOT=
set TC_DATA=

  obviously setting the correct paths after the '=' sign

Re: Run Journal through command prompt

So what does TC ROOT and DATA refer to?

Re: Run Journal through command prompt

TC ROOT is the local root directory for your teamcenter installation

TC DATA is the location of your teamcenter server data

Solution
Solution
Accepted by topic author junfan
‎08-26-2015 04:32 AM

Re: Run Journal through command prompt

Only needed if you use Teamcenter (as are these arguments in the original post: "-pim=yes -u=username -p=password - they specify to use Teamcenter, and what username/password to log into teamcenter)

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: Run Journal through command prompt


Hello,
I just try for native session I get this error below

The MSVCDir environment variable is not defined
This variable is necessary only when using uflink or starting up Studio
from this window. You must modify the ufvars.bat file to define this.

C:\Program Files\Siemens\NX 8.0\UGII>run_journal "D:\journals\zoom_journal.vb"


Journal execution results for D:\journals\zoom_journal.vb...
Error loading libraries needed to run a journal.

Caught unexpected error: 948995: NX Viewer does not support running scripts

====================================================
Failed to handle error condition correctly - exiting
Invalid trailer (612665676) found in block &000000007769E04A
====================================================
====================
Fatal error detected
====================

C:\Program Files\Siemens\NX 8.0\UGII>