Showing results for 
Search instead for 
Do you mean 

External journal execution



I made a journal which imports external expressions and afterwards automatically updates the tool path of a CAM-operation.


Now i want to run/execute the journal without using NX.

Is there any way?


Thanks in advance


Re: External journal execution


There are two ways to do that.  If you have the NX Open .Net Author license, you can build your program as an executable (.exe) to run from the command line.


Or you can use the run_journal.exe utility to execute your .VB or .C# code directly.  You can pass arguments on the command line like this when using run_journal.exe:


run_journal    myProgram.vb    -args    somePart.prt


You can pass more than one argument into the program if needed.


In both cases, you will save yourself some trouble if you start from an NX Command Prompt, which you can get from Start -> NX# -> NX Tools.  This will help to ensure that your program has the environment it needs.


Also note that your program will need to open any part files you want to process, and might need to make the switch to the Manufacturing application.

Re: External journal execution

Is there any tutorial for beginners?


I don't know what to write in the batch-file.


Re: External journal execution

You mentioned that you had a Journal that was working, so that is a good start.  If necessary, start recording a Journal from the state in NX before you open your part, so you can see what the code to do that looks like.  Then open the part and perform the desired actions while recording.


We have a lot of examples in the Solution Center to help you with developing your programs.  If you search for:


sample program command line


you should find a very small program called "open_part_from_command_line_argument.vb" that demonstrates how to pass the name of a part into a program running from the command line, whether it is running as a .EXE or you are using run_journal to execute it.


You might also want to look at the excellent NX Open Getting Started Guide that is provided with the NX11 documentation.  That is also available on the support website, under Documentation -> NX -> NX11 -> NX 11 Programming Tools Help -> NX Open.

Re: External journal execution

I can't find the "open_part_from_command_line_argument.vb". Do you have a link?

Re: External journal execution

I couldn't find it either very easily, so I changed the search term to "open_part_from_command_line_argument.vb" filtered for "nx_api" and it found a single hit:


Graham Inchley Snr R&D Engineer (Systems Development), Sandvik Coromant
Lenovo ThinkPad W540, Win7, 16GB. Developing in: Java | C | C# | KF
Production: NX8.5.3.3 MP11 64bit Testing: NX9.0.2.5

Re: External journal execution