Find the Local the directory where development was done, in code.
I have a Robotics project under development and have some temporary .txt files stored in the project directory and stored as part of the project. I need an easy way to reference the files (without coding an absolute path). using functions like Runtimehost.GetProjectPath returns where the runtime has placed project for running (ex: c:\users\AppData\Local\Openspan\etc.... ), and note where the debuggering is happening (ex: c:\botprojects\myBot1\bin\debug)
Tried a number of window apis (via c#) with no luck. Either points me to the AppData, or the runtime dir. Neither of which is what I need..
I don't have the ability to test either of these at this exact moment, but I believe one of these will work. Right-click the Toolbox and select "Choose Items". Then select the "Pega Robotics Static Members" tab and browse for the "OpenSpan.Runtime.Core.dll". Under RuntimeHost are several methods that give you various information about the Runtime. Try "GetDeploymentPackagePath" first. If not, try "GetProjectPath". As I recall, you might have to do a little manipulation of the path to get exactly where you need, but this should get you close to what you need.
WINNER!!! GetDeploymentPackagePath was exactly what I needed. Had the path and the .openSpan project name in it, which I stripped out for my purposes.. But otherwise was a spot on answer... Thanks sasnt!!!