tsc_JobXml

This class is used to import a Trimble JobXml file to a job or to export a job to a Trimble JobXml file.

Available in SC version 2.00 and above.

Public methods

bool Import (const char* outputJobdbFilePath, const char* inputJobXmlFilePath);
Imports a jobxml file to a new job. The input file must exist and the output file must not exist. Returns true if the import is successful, false otherwise. For a False return, call GetLastError to get an informative error message in English.

bool Export (const char* inputJobdbFilePath, const char* outputJobXmlFilePath);
Exports a job file to a new jobxml file. The input file must exist and the output file must not exist. Returns true if the import is successful, false otherwise. If false, call GetLastError() for a full informative error message.

void Cancel();
Cancels an import that is currently in progress. Export cannot be cancelled.

tsc_String GetLastError() const;
Returns more information about the error that occurred if an import or export returns false. The text is always English.

virtual void OnProgress (int total, int progress);
This virtual function may be overridden to monitor the progress of the current operation. The percentage of the file processed can be calculated by:

int percent = (progress * 100) / total;

Â