get_OMRValue method
The get_OMRValue method gets the positions within the optical mark recognition (OMR) field of the check boxes that are selected. You can use this method to pass the positions to variables or actions, such as those that are used in verification functions to confirm that check boxes are selected.
Each character in an OMR field is assigned the value 0 (ASCII
48 = not selected) or 1 (ASCII 49 = selected), and
the resulting binary string is expressed as a decimal. The following
XML example is 000100, which equals 4 in decimal.
So, the return value is 4.
<F id="1a">
<V n="TYPE">1a</V>
<V n="Position">120,1025,853,1169</V>
<V n="STATUS">0</V>
<V n="DensityString">BAAVAA</V>
<C cn="10" cr="519,1132,559,1170">48</C> <!--48 indicates option not selected-->
<C cn="10" cr="563,1132,603,1170">48</C>
<C cn="10" cr="607,1132,647,1170">48</C>
<C cn="10" cr="652,1132,692,1170">49</C> <!--49 indicates option selected-->
<C cn="10" cr="697,1132,737,1170">48</C>
<C cn="10" cr="763,1132,803,1170">48</C>
</F>
Syntax
- C#
int get_OMRValue(int nIndex)
Arguments
- nIndex
- 0 specifies the primary value. When the field contains multiple recognition, voting, or multi-pass data entry values, 1 specifies the first alternative, 2 specifies the second alternative, and so on.