Most StringReader step results
are returned in arrays. Each string model contains an array of
occurrences, including strings read. To access the results of a
particular string, you must specify the string's StringModel and
OccurrenceIndex. For example, the first string in the string model
"Lot" could be found using StringReader.StringModels("Lot").StringsRead(1).FormattedString.
Typically, you access the results by displaying the outputs from
the
Link editor. In this example, the number of strings found
in the string model is accessible like this:
At design-time, you can also use the
Quick Evaluate pane to examine the value of a feature. To
change the model or index of the feature you want to access, move
the cursor over the item in parentheses, and when the cursor
changes shape (from an arrow to a hand), click to pop up the
selection box, as shown in the following illustration.
Your results can be formatted in several ways. By selecting
StringsRead(OccurrenceIndex).FormattedString,
the results will include a space character between any characters
that are separated by a space in the string. By selecting
StringsRead(OccurrenceIndex).String, the
results will not include any space characters, regardless of the
existence of spaces in the string. By selecting StringReader.Text, the result will not be an
array of strings, but rather a single string comprising all the
strings in the image, including both space characters within
strings and new line characters between strings.
The basic Results
pane shows results established from all the strings found in the
image. To see more granular results, use the
Quick Evaluate pane.
-
String results.
The StringModels collection contains an array of the string
models used to locate and read the strings. Each string model entry
contains a StringsRead collection. The StringsRead collection is
itself an array of objects, with each entry including information
about a string read.
To create an array of the StringsRead collections from all
string models, use FLATTEN(StringReader.StringModels,
Item.StringsRead). To create an array of only the strings
found across all string models, use FLATTEN(StringReader.StringModels, Item.StringsRead,
SubItem.String).
-
Character results.
The Characters collection, found in the StringsRead collection,
is an array of objects that contain information about the
individual characters in one of the strings in the StringsRead
collection. For example, to access the score of the first character
found in the first string located using the "Lot" string model, use
StringReader.StringModels("Lot").StringsRead(1).Characters(1).Score.
The information in the Characters collection includes the specific
character, the font, the homogeneity, the scale, the score, and the
position of each detected character.