int shell_func(string directive, ...)

Performs accessing the system functions.
A set of arguments is determined in accordance with the directive.
Returns 0 if it succeeds. If something went wrong, returns -1.

get_path   get path string in accordance with the request
set_cur_dir   change directory
shellexecute   do operation


Command format:

shell_func("get_path", string what, string result);

Variable what specify result path type:

rootconfig to obtain the path to the root directory of the current configuration
tsimages to obtain the path to the images directory of the current configuration
tsprg to obtain the directory path of the programs of the current configuration
rootaddons to obtain the path to the directory where he LabPP_Automat


Command format:

shell_func("set_cur_dir", string path_or_what);

path_or_what - may be a path or directive ("rootconfig", tsimages, tsprg or rootaddons).
Example. Set current directory to "C:\\MyDir":

string mydir = "C:\\MyDir";
int res = shell_func("set_cur_dir",mydir);
   cout << "Work directory successfully changed";
   cout << "Change directory to " << mydir <<" failed";


To run the operation software.
You can open the files, send them for printing etc. by means of a corresponding program, given at the operating system level.
Example. Open file "Example.xls" in the current configuration LabPP_Automat.

int res = shell_func("set_cur_dir","rootconfig");
if(res !=0)
   return -1;
res = shell_func("shellexecute","Example.xls");

The file will be opened Example.xls with the help of the program, which is the default for files with the extension .xls on the user's computer. This is usually EXCEL.
So you can open EXCEL files from ARCHICAD.