The gmAPI Paradigm
The paradigm for using gmAPI with gmStudio is a bit different and is engage by setting the TScript field on the task to the path of a .NET Exe rather than an xml file.
- gmPL: gmStudio prepares an actual translation script (JobID.xml) by detokenizing %placeholders% and merging ScriptRules found in the template translation script file specified on the Tscript field for each task in the gmProj file. gmStudio spawns gmBasic.exe passing the actual translation script as a command line argument. gmBasic.exe executes the gmPL commands specified in the actual translation script.
- gmAPI: gmStudio prepares a task information file (JobID.xml) . gmStudio spawns your gmAPI Exe (e.g. Upgrade.exe) passing the task information file as a command line argument. Upgrade.exe uses the TaskInfo API and the ScriptRules API as needed to invoke gmAPI commands.
Note that the use of ScriptRules files are optional for the gmPL approach since a developer may insert XML into the template translation script directly. However, since there are translation scripts with the gmAPI approach, ScriptRules are typically required.
See also
gmAPI reference and samples are here: gmAPIIntroduction