Command lineΒΆ

A Hexaly Model program is executed with the following command in a console where file.hxm is a text file containing a valid program and arguments is a list of arguments:

hexaly file.hxm [arguments]

The arguments will be available in Hexaly Modeler as global variables. Each argument consist in an assignment of a value to a global variable. Before starting the execution of the program, these assignment statements will be executed. They are described by the following lexical definition:

arguments      : argument*
argument       : identifier "=" value
value          : float | integer | string | cmdmap
cmdmap         : ( identifier ":" cmdmapvalue | cmdmapvalue )+
cmdmapvalue    : float | integer | string

For example:

hexaly test.hxm x=12 y=abc z="a string with whitespaces" t=true

will assign the integer value 12 to variable x, the string "abc" to variable y, the string "a string with whitespaces" to variable a and the value 1 to variable t.

The assignment of values to maps follows a specific syntax:

hexaly test.hxm a=z,12,8:text,key:41

will create a map a with z associated to key 0, 12 associated to key 1, text associated to key 8 and 41 associated to key key.

Note

The syntax a={2,3} is not valid to assign maps in the command line since unix shells interpret braces as a quantifier.

Note

On Windows, the colon character : is used to separate the drive letter from the directory. Thus, do not refer explicitly to the drive when you want to pass a path in a variable.

For example hexaly myFile.hxm inFileName=C:\\tests\\test.in will not assign the given path to the global variable inFileName. According to the explained behavior above, it will create a map with \tests\test.in assigned to key C.