Create results for a group field Script Locator
You can create results for a group field by following these steps:
-
Define where the
pLocator comes from using the following example:
Dim pLocator As ICscXDocField Set pLocator = pXDoc.Locators.ItemByName(<Name of Script Locator>) -
Add one or more alternatives as follows:
pLocator.Alternatives.AddNew -
In combination with additional logic, use the results from other locators to create the required values within the
Script Locator. Retrieve results from other locators as follows:
pXDoc.Locators.ItemByName(<Locator Name>).Alternatives(<N>).TextThis example retrieves the alternative with index N from a locator producing multiple single-result alternatives, such as a Format Locator.
pXDoc.Locators.ItemByName(<Locator Name>).Alternatives(<N>).Subfields.ItemByName(<Subfield Name>).TextThis example retrieves a subfield result from a locator producing multiple subfields per alternative, such as an Advanced Zone Locator.
-
Assign text values to the
Script Locator subfields.
pLocator.Alternatives(<N>).Subfields.ItemByName(<Subfield Name>).Text = <TextValue> -
Assign confidence values (between 0 and 1) to the
Script Locator subfields.
pLocator.Alternatives(<N>).Subfields.ItemByName(<Subfield Name>).Confidence = <ConfidenceValue> -
If required, assign co-ordinate values (in pixels) to the alternatives in the
Script Locator subfields.
pLocator.Alternatives(<N>).Subfields.ItemByName(<Subfield Name>).Top = <Top Coordinate>pLocator.Alternatives(<N>).Subfields.ItemByName(<Subfield Name>).Left = <Left Coordinate>pLocator.Alternatives(<N>).Subfields.ItemByName(<Subfield Name>).Height = <Height>pLocator.Alternatives(<N>).Subfields.ItemByName(<Subfield Name>).Width = <Width>
Related topics: