Applies To:
  • CitectSCADA 1.00, 1.01, 1.10, 1.11, 2.00, 2.01

Summary:
The Exec function will only accept a relative path as the first part of the argument. For example, you may specify a relative path for the executable file but not as part of the argument. This is because Citect cannot tell if an argument passed to another program should be a relative path expansion or not (Citect cannot tell what the arguments should look like).

For example, this is valid:

Exec("[run]:excel sheet.xls");

This is invalid:

Exec("excel [run]:sheet.xls"); 


Solution:
If you want to use a relative paths as an argument to an executable then expand the path using StrToPath function and pass to Exec:

Exec("excel " + PathToStr("[run]:sheet.xls")); 


Keywords:
 

Attachments