* Fix formatting, grammar, and syntax Additionally, a sentence that referenced something that isn't used anywhere was removed. * Promote headers, Format stuff Many headers were far too deep. In some cases, the highest header was h4. To correct this, the offending headers were promoted once or twice as appropriate. Minor formatting changes were made, too. * Fixed an incorrect conversion constant. * Update library dependency explanation The old explanation was confusing and seemingly self contradicting in places. This new explanation aims to fix that. Co-authored-by: Matthew Elmer <m.elmer@mailbox.org>
1.7 KiB
Home → Documentation Home → Simulation Capabilities → Command Line Arguments |
---|
The Trick::CommandLineArguments class stores the command line arguments specified by the user when starting the simulation. The class provides routines to access the arguments.
Accessing the Command Line Arguments
The command line arguments are available to user classes through the following two calls.
int command_line_args_get_argc() ;
char ** command_line_args_get_argv() ;
Specific directories and file names may be accessed by the following calls.
const char * command_line_args_get_output_dir() ;
const char * command_line_args_get_input_file() ;
const char * command_line_args_get_default_dir() ;
const char * command_line_args_get_cmdline_name() ;
Modifying the Output Directory
By default the RUN directory of the input file is the output directory. To change this specify the -O or the -OO command line arguments.
S_main_${TRICK_HOST_CPU}.exe RUN_dir/input.py -O <output_dir>
All Trick core output files will be written to the specified <output_dir>.
TimeStamping the Output Directory
The user may also specify a time stamped output directory in the input file.
trick.output_dir_timestamped_on()
This will create a dated subdirectory in the current output directory. All of the Trick core output files will be written to the output directory. This option may be used in conjunction with the -O or the -OO command line arguments.