It seems like such a simple set of code now ... but when I was banging my head trying to get it to work, well, that is a different story.
This function is called after FastCAD (the engine under the hood of profantasy’s Campaign Cartographer 3) runs a method that asks the user for a script file (PythonCmd). FastCAD places the name of the file in txtFileName as a char.
All the SetVariables setup C++/cli classes that I use to expose FastCADs API. From here I work through delegates so that I never have to discover functions in IronPython. I could not figure out how to do that in C++/cli 3.5. It seems easy in 4.0 with the dynamic type, but Campaign Cartographer 3s installer currently only loads the C++ 3.5 runtimes.