User's Guide > Fundamentals > user_initialize() Arguments
user_initialize() Arguments
 
user_initialize() is called with a number of input and output arguments. As always in C, if you don't need to use an argument, your function does not need to declare it, provided that it declares all the arguments up to the last one used.
The input arguments are:
int arg_num
Number of command-line arguments.
char *argc[]
Command-line arguments passed by Creo Parametric. (See further explanation below.)
char* version
Release name of the Creo Parametric being used.
Note: From Pro/ENGINEER Wildfire 4.0 onwards applications built with libraries older than Pro/ENGINEER 2001 will not run. You must recompile these applications with later versions of the Pro/TOOLKIT libraries.
char* build
The build number of the Creo Parametric being used.
The output argument is:
wchar_t err_buff[80]
The text of an error message passed to Creo Parametric if the Creo TOOLKIT fails to initialize. Creo Parametric displays this text when it reports the Creo TOOLKIT failure (if user_initialize() returns non-zero).
The first command-line argument passed to Creo TOOLKIT is the same one seen by Creo Parametric; that is, it is the name of the Creo Parametric executable. The remaining command-line arguments passed to user_initialize() are a subset of those given on the command line that invoked Creo Parametric. The rule is that Creo Parametric passes on to user_initialize() any command-line argument that starts with a “+”, or with a “-” followed by an upper-case character.
For example, these command-line arguments will be passed to Creo TOOLKIT:
+batch=mybatchfile.txt
-Level=expert
Command-line arguments such as -g:no_graphics are interpreted by Creo Parametric but not passed on to Creo TOOLKIT.
¿Fue esto útil?