Returns a two-dimensional array of the data extract options that can be passed to Extract. The array includes the options’ names and default values. For some options, the array also identifies the valid range of values.
<HsvData>.EnumExtractOptions pvar2davOptions
Variant array. Returns a two-dimensional safe array that represents the data extract options. The first dimension identifies the options, and is indexed from 1 to 20. The indexes and corresponding extract options are listed in Table 60, Data Extract Options. The second dimension provides information on options, and is indexed from 0 to 5: For example, since the delimiter option is the second item in the first dimension, array item (2,2) stores the system’s default delimiter. |
The following example defines a function named getDataExtractDefaults that returns an array of the default extract option values. This function loops through the array returned by EnumExtractOptions, assigning each option’s default value to the vaDataSettings array. vaDataSettings is then assigned as the function’s return value.
Function getDataExtractDefaults() As Variant
Dim vaOpts, vaDataSettings(1 To 20)
m_cHsvData.EnumExtractOptions vaOpts
'Assign the default values, which are stored in the
'item # 2 of the second dimension of vaOpts.
For i = LBound(vaOpts) To UBound(vaOpts)
vaDataSettings(i) = vaOpts(i, 2)
Next i
getDataExtractDefaults = vaDataSettings
End Function
This function is used in the Example for Extract. |