Init function
Applies To: Implementing a custom process
Initializes the components of the form.
This function is the load function of the form. It ensures that the values entered by the user are updated from the XML every time the form is reopened. Only the process Extensible Markup Language (XML) is needed for a custom user interface. The rest of the parameters of this function can be safely ignored although the signature cannot be changed.
[C#]
bool Init(string processXML, string processXADef, string isDefXML);
Arguments
[in] processXML
XML string containing process properties. This is the XML that is displayed by the process.
[in] processXADef
XML string containing XML Attribute Definition (.XADef) properties.
[in] isDefXML
XML string representing image service definition (.ISDef) properties.
Return value
A Boolean value signifying success.
Reporting errors and warnings: A false return is an error that can be obtained by calling the GetStatus function, which will report the last error in the DLL.
Example
The following example represents a C# implementation of this function:
[C#]
public bool Init(string processXML, string processXADef, string isDefXML)
{
myProcessXML = processXML;
/// Load the processXML into the DOM object.
if (!GeneralUtility.XMLUtility.LoadXML(myProcessXML,
myProcessXMLDom, myStatus))
{
return false;
}
txtAlias.Text = myProcessXMLDom.SelectSingleNode("//Process/Alias").InnerText;
return true;
}
For a detailed example on how to implement this function, see Sample custom process.
Related Topics
See also: CustomProcess_Create, CustomProcess_SetWindow, CustomProcess_Initialize, CustomProcess_GetRow, CustomProcess_GetMetadata, CustomProcess_GetLastError, CustomProcess_Cleanup, CustomProcess_SetCallbackFunctions, CustomProcess_SetAreaOfInterest, CustomProcessUI_Init, CustomProcessUI_ShowModalDialog, CustomProcessUI_GetUpdatedXML, CustomProcessUI_GetStatus, CustomProcessUI_GetProperty, CustomProcessUI_SetProperty, CustomProcessUIForm_GetUpdatedXML