Datacap object API reference
You can use Datacap object APIs to create or modify runtime batches and document hierarchies, and to obtain or modify recognition confidence levels, field values, text values, and object types. To use Datacap object APIs, you reference TDCO.DLL in your development environment, such as Microsoft Visual Studio.
Datacap contains three separate classes or APIs that you can use to complete actions on different parts of a Datacap object (DCO), which can be a batch, document, page, field, or character. You use the three sets of Datacap API to modify the document hierarchy (setup DCO) and the runtime batch hierarchy (runtime DCO).
Datacap requires an XML file to process a batch. When you use Datacap Studio to create an application, Datacap saves the setup DCO as an XML file, for example, C:\Datacap\application name\dco_application name\application name.xml. Similarly, if you create a document hierarchy outside of Datacap Studio, you use an API to save the setup DCO as an XML file. Each Datacap object is represented as a node in the XML file. The setup DCO defines the expected structure of a batch, including valid documents, pages in documents, the fields on each page, and other predefined information.
Datacap creates the runtime DCO when a workflow is started. When a task completes, Datacap writes the batch to a batch folder, for example, C:\Datacap\APT\batches\batch number. The runtime information comprises a root file that is named after the completed task, for example, C:\Datacap\APT\batches\batch number\Verify.xml and defines the documents and pages in the batch. Datacap also writes a data file for each page, for example, C:\Datacap\APT\batches\batch number\tm000001.xml. The runtime DCO indicates the current composition of the batch, including documents, pages, fields, and characters.
The three sets of APIs are DCO, DCOSetup, and DCOSetupNode. You can use the APIs to search or browse through a DCO object, starting from the root node (batch) to a child node, which includes documents, pages, fields, and characters. Using the APIs, you can find and select a child node, and modify or populate a value. You use the DCO APIs with a runtime DCO, the DCOSetup APIs with the setup DCO, and the DCOSetupNode APIs with individual nodes in the setup DCO. The following tasks represent a sample of how you can use some of the APIs:
- Create a document hierarchy
- Modify a batch by creating documents, reorganizing pages, or deleting documents
- Determine the page types that contain confidential information and, with the implementation of custom verification panels, display only those pages to an operator who has appropriate security clearance
- Create, modify, or populate fields and characters
- Access and modify a dictionary that can be used to present a list of valid field values to an operator during a verification task
- Use XML files to load a batch, or save a batch to a disk