Read method

The Read method reads the runtime information from a Runtime DCO file or a page data file, and writes the information into the DCO object.

This method can read a Runtime DCO file (for example, Verify.xml), or a page data file (for example, tm000001.xml) of an application. Because new DCO objects are created as batch objects by default, you must first create a child object of type page before using the Read method to directly read the page data file. Runtime information files are located in the batches folder of an application, and include the data that are denoted by the following properties:

|--m_oDCO
   |--BatchDir(string)
   |--BatchPriority(int)
   |--ConfidenceString(string
   |--ID(string)
   |--ImageName(string)
   |--Options(string)
   |--Status(int)
   |--Text(string)	
   |--Type(string)
   |--XML(string)
   |--AltConfidenceString(string)*
   |--AltText(string)*
   |--CharConfidence(int)*
   |--CharValue(int)*
   |--OMRValue(int)*
   |--Variable(string)*	          
* These extended properties are accessible directly from VBScript or through the corresponding get method or set method in .NET.

Syntax

VBScript
oDCO.Read (FilePath as String) as Boolean
C#
bool Read(string lpszFileName)

Applies to

Batch or page objects only.

Arguments

lpszFileName
The full path and name of the file to read.

Returns

Returns true if successful; returns false if unsuccessful.

Example

The first example reads the Runtime DCO file into an existing batch level DCO object:
 m_oDCOBatch.Read("C:\\Datacap\\APT\\batches\\20100096.001\\Verify.xml");
The second example creates a runtime DCO object with a page data file only:
TDCOLib.DCO m_oDCO = new TDCOLib.DCO();
TDCOLib.DCO m_oDCOPage = new TDCOLib.DCO();
m_oDCOPage = m_oDCO.AddChild(2, "NewChildPage", -1);
m_oDCOPage.Read("C:\\Datacap\\APT\\batches\\20100096.001\\tm000001.xml");
If there is an error, the IsError method returns true and the GetLastError method returns the last error message.