set_CharValue method
The set_CharValue method sets the ASCII data value of the primary character or alternative character.
.NET Restriction: For VBScript,
use the CharValue instead.
To set the text of the entire field, use the set_AltText. In the following sample XML
file, the primary value for the fourth character is 110. The first
alternative value is 52, and the second alternative value is 56.F id="Vendor">
<V n="TYPE">Vendor</V>
<V n="Position">0,0,0,0</V>
<V n="STATUS">1</V>
<C cn="6,8,10" cr="0,0,0,0">83,49,53</C>
<C cn="6,8,10" cr="0,0,0,0">116,50,54</C>
<C cn="6,8,10" cr="0,0,0,0">105,51,55</C>
<C cn="6,8,10" cr="0,0,0,0">110,52,56</C>
</F>
Syntax
- C#
void set_CharValue(int nIndex, int pVal)
Applies to
Character objects only.Arguments
- nIndex
- 0 specifies the primary value. Where the field contains multiple recognition, voting, or multipass data entry values, 1 specifies the first alternative, 2 specifies the second alternative, and so on.
Returns
Nothing.C# example
This example sets the second alternative value of the fourth character (index = 3) in the Vendor field. The root of the search in this case is the page DCO.
m_oDCOPage.FindChild("Vendor").GetChild(3).set_CharValue(2, 56);