Click or drag to resize

GM_RunScript

Runs a Global Mapper script (.gms) or workspace (.gmw). You can provide the filename of the script to run or you can provide script as raw text. If you provide non-NULL aLayerList and aNumLoadedLayers values then the script will be run in the context of the currently loaded data and any data left loaded by the script will be available after it completes. Otherwise the script will run in its own sandbox.

Syntax
GM_DLL_EXPORTED GM_Error_t32 __stdcall GM_RunScript
( 
const char*             aFilenameOrText,    // IN: string with full path of script or the actual text of the script
GM_LayerHandle_t32**    aLayerList,         // OUT: list of layer handles loaded by the script (NULL if you don't want to keep them around)
uint32*                 aNumLoadedLayers,   // OUT: number of layer handles in aLayerList (NULL if you don't want to keep the list)
GM_LoadFlags_t32        aLoadFlags,         // IN: Extra flags for load behavior
void*                   aReserved           // IN: Reserved for future use, must be NULL
);