Running VX from a Command Line

 

Additional options are available when you run VX applications from a command line. Open a command console window and change directories to your user directory. Entering "vx -h", "vx -vh" or "vxserver -h" will display command line help for VX CAD/CAM and the VX Server applications. See below for additional information.

 

General Information

 

When VX is launched, a program called "vx.exe" is executed. "vx.exe" is actually a helper application that sets up the environment for running VX. "vx.exe" ultimately executes "vxmain.exe" and then terminates. "vxmain.exe" is the actual VX executable, but it cannot run on its own without vx.exe.

 

When you run "vx -h", you display help on the command line options for "vxmain.exe." When you run "vx -vh," you display help on the command line options for "vx.exe." There is another executable called "vxc.exe" which was created exclusively for use with the remote functionality of VX. "vxc.exe" is the same program as "vx.exe" but runs in the current command shell whereas "vx.exe" detaches from the current command shell and runs in a new one.

 

What's the difference? Let's assume that you are writing a perl script that sends a command to VX:

 

  1. @data = `vx -remote local -cmd xxx`;

  2. @data = `vxc -remote local -cmd xxx`;

 

 

In case 1 above, any data that VX returns is lost since "vx.exe" runs in a separate shell. The only way to get to the return data is to use the "-out" option to have the return data written to a file and then to read the file when the command is finished. Here the @dataarray remains empty;

  

In case 2 above, the return data is returned into the @dataarray since "vxc.exe" runs in the same shell that it was executed in.

  

To get the same result as in case 2, case 1 would need to be written like this:

 

@data = `vx -remote local -out vxout.txt -cmd xxx`;

open(FH,"vxout.txt");

@data = <FH>;

close(FH);

 

 

Using "vxc.exe" also has other advantages. When you run VX using "vxc.exe" then any messages that VX prints to the console can easily be captured or redirected to a file or program.

 

The help displayed when entering "vx-h", "vx -vh" and "vxserver -h" is shown below.

 

 

Command line options for "vxmain.exe"

 

Type "vx -h"(without the quote marks) at the command line to display help:

  

vx [/F file_name [/O object_name]] [/CMD command]

   [/L] [/LK] [/LP] [/LI] [/DL] [/S] [/LS] [/LSF]

   [/C file_name] [/CMP file1 file2] [/I]

   [/D template_dir forms_file]

   [/T template_file forms_file]

   [/VIEWER] [/R] [/PORT p] [/SERVER]

   [/LPORT p]

   [/PARTSERVER psfile outputdir filetype(2 or 3)]

   [/MACRO file_name] [/DPRINT]

   [/FH] [/VH] [/?] [/H]

   [/CNS] [/NCS]

   [stop]

 

 

Command Line Options for "vxmain.exe"

/F

Load and activate file_name

/O

Activate object object_name located in file file_name

/CMD

Initial command to be executed after startup

/L

Install license to computer

/LK

Install license to hardware key

 /LP

Get a new password from the VX password server and install it

/LI

Display existing license information

/DL

Delete an installed license

/S

Display system id used for licensing

/LSF

Set the install to server flag for the GUI

/LS

Install license to a running server

/C

Convert file_name to/from exchange binary format

/CMP

Compare binary files file1 and file2

/I

Install VX software and/or user working directory

/D

Compile all templates in template_dir into the forms_file

/T

Compile the template file template_file into the forms_file

/VIEWER

Run VX Viewer application

/REMOTE /R

Send a command to an already running instance of VX

/PORT p

Specify the server mode communication port to be used

/SERVER

Run VX in server mode

/LPORT p

Specify the license server communication port to be used

/PARTSERVER

Used for automatic generation of PARTsolutions PARTserver parts

/MACRO

Execute the specified macro file at startup

/DPRINT

Print debug information to the console

/FH

Display help on compiling and converting fonts

/VH

Display additional command line options

/H /?

Display this help on command line options

/CNS

Use console for STDIN input and STDOUT, STDERR output

/NCS

Console will wait for 10 seconds instead of key press

stop

Program stops execution in main() and InTplCompile()

 

 

Command line options for "vx.exe"

 

Type "vx -vh" (without the quote marks) at the command line to display help:

 

Vx [/VH] [/DBGPRT] [/CUT] [/REMOTE]

[R] [/OUT file] [/DA] [/NL] [/EN] [/FR]

[/DE] [/IT] [/JP] [/KO] [/PT] [/ES]

 

 

Command Line Options for "vx.exe"

 

/VH

Display this help on command line options

/DBGPRT

Print debug information

/CVT

Convert a DOS format file to a UNIX format <\r\n -> \n>

/REMOTE

Send a command to an already running instance of VX

/R

Same a /REMOTE

/OUT file

Write return data from a remote command to the specified file

/WAIT

Wait for a command from a running instance of VX

/W

Same as /WAIT

/NOSTDOUT

Do not send output to STDOUT

/DA

Set language to Danish

/NL

Set language to Dutch

/EN

Set language to English

/FR

Set language to French

/DE

Set language to German

/IT

Set language to Italian

/JP

Set language to Japanese

/KO

Set language to Korean

/PT

Set language to Portuguese

/ES

Set language to Spanish

/CH

Set language to Chinese-traditional

/CHS

Set language to Chinese-simplified

/CHT

Set language to Chinese-traditional

     

     

Command syntax for /R and /REMOTE options:

 

vx /out file /R hostname[:p] command

 

hostname

The name of the computer that is running VX

p

Optional port number to connect to (default = 8000)

command

The command to be executed by VX

file

Will contain return data for command after the command is finished

     

 

Command syntax for /W and /WAIT options:

 

vx /WAIT p

 

p

The port number to wait for input on

 

 

Command line options for "vxserver.exe"

 

Type "vxserver -h" (without the quote marks) at the command line to display help:

 

vxserver [/H] [/DBGPRT] [/CNS] [/L] [/LK] [/LI] [/LP]

         [/LE] [/DL] [/S] [/PORT p] [/LOG]

 

 

/H

Display this help on command line options

/DBGPRT

Print debug information to the console

/CNS

Display a console window while running

/L

Install license to computer

/LK

Install license to hardware key

/LI

Display existing license information

/LP

Get a new password from the VX Corp password server

/LE

Get a new password through email

/DL

Delete an installed license

/S

Display system id used for licensing

/PORT p

Set the communication port to p

/LOG

Generate a log file of all activity

 

 

Using a Config File

 

Command line options can also be specified in a config file. The config file must be called vx.cfg or vxserver.cfg and be located in the same directory as the executable (.). Specify each part of a command line argument on a separate line in the config file. To specify a different communication port:
 

========== Start of vxserver.cfg ==========
/PORT
3000
=========== End of vxserver.cfg ==========

 

 

Related Topics

Return to VX CAD/CAM Index