EnumExtractOptions

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.

Syntax

<HsvData>.EnumExtractOptions pvar2davOptions

Argument

Description

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:

  • 0 = The option’s index in the array of options passed to Extract. (Long subtype).

  • 1 = The option’s name. (String subtype).

  • 2 = The option’s default value. (The subtype varies).

  • 3 = The option’s minimum value, if any. (Long subtype).

  • 4 = The option’s maximum value, if any (Long subtype).

  • 5 = A tab-delimited list of the option’s valid values (String subtype). If the option is not restricted to a set of values, a blank String is returned.

For example, since the delimiter option is the second item in the first dimension, array item (2,2) stores the system’s default delimiter.

Note:

Options without minimum and maximum values will return 0 for items 3 and 4 of the second dimension.

Example

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

Tip:

This function is used in the Example for Extract.