IVHooks interface : FileSaved method

FileSaved method
Event
A protocol file, runset file, or device file was saved.
Description
VWorks software calls the FileSaved method when the user saves a protocol file, runset file, or device file.
Syntax
 
HRESULT FileSaved(
[in] BSTR sXML,
[in, out] BSTR* sResultXML
);
Parameters
 
FileSaved method input
VWorks software passes a FileSaved XML element into the sXML parameter of the FileSaved method. This XML element provides the file path of the file that was saved.
FileSaved element
The FileSaved element has the following attribute:
 
Example of FileSaved method input
The following sample code is a FileSaved XML element that is received by the plugin from VWorks software as a string in the sXML parameter of the FileSaved method. VWorks software tells the plugin that the protocol file named file1.pro located in the C:\V11\V11 Files\Protocols directory was saved.
 
<FileSaved Path='C:\V11\V11 Files\Protocols\file1.pro' />
FileSaved method output
The plugin returns a HookResults XML block in the sResultXML parameter of the FileSaved method. For information about the structure and contents of this XML block, see “HookResults XML block” .
Example of FileSaved method output
The following sample code is a HookResults XML block that is returned to VWorks software by the plugin as a string in the sResultXML parameter of the FileSaved method. The plugin tells VWorks software to write the following Info-type message to the Main Log:
file1.pro was saved.
 
<HookResults>
<Results>
<HookResult ResultType='Log Message' ResultValue='file1.pro was saved.' />
</Results>
</HookResults>
Related information