Is there a way (other than sharing the hosts variables) to pass back a return value from an included project? It doesn't appear so, it also appears you can set the value of an existing environment variable from within AT3 (i.e. create an environment variable in windows manually with a value, set the value via AT3 and you'll see the change made in AT3 won't exist after the fact).
Also is there any way to pack, clear/purge or truncate the AT projects log while it's running? I have a project that calls other projects in a continuous loop (with a 3 minute delay for each pass), but the log will get pretty huge - how can I periodically truncate that from within the project (e.g. keep only the last 24hrs of the log)? There's an option in the Gui (Run history\Clear or Pack).
Sharing host variables is the only way to pass back a return value. As for setting environment variables… that is intentional, changes to the variables are only visible to AT3 and processes it spawns.
There isn’t any programmatic way to truncate the log file. Perhaps it might be better to schedule the project to run periodically rather than looping continuously? The other option is to have it run without a log file at all (/S for atcmd ). The downside to that is you won’t be able to export the log, so you will need to set the important actions to log to a variable if you need the info.
Pruning shouldn't require closing the file - deleting the log would. And if you did need to close the file to prune or delete the log couldn't you just log to memory during the action and then flow in the new log data after the action completes? Hopefully this doesn't entail any large changes to implement...
I guess the issue is what does it prune… if your project is running continuously then that will be a problem, as Automise doesn’t like having half a log and cannot prune the log for the current run without causing a bunch of problems. The hierarchical nature of the log means that if we start pruning nodes from the tree then we start getting errors when other nodes are logged and their parents have gone away. So pruning can only work for an entire run. Since you are pausing for 3min between iterations, a simple work around is to schedule the project to run every 3 minutes, that way the log can be pruned automatically according to your settings in the IDE.