All Cadcorp SIS API Methods

GetCursorFieldStatistics Method

Description

Get the statistics for a numeric field in the specified cursor.

Syntax

Visual Basic
Public Function GetCursorFieldStatistics( _
   ByVal cursor As String, _
   ByVal nField As Long _
) As String

Parameters

cursor
The name of the cursor we are interrogating.
 
nField
The index number of the field we are interrogating, the index starts at 0.

Return Type

The field’s statistics as a string.

Remarks

The returned string contains a set of name-value pairs. In a pair the separator between the name and value is a TAB character. The separator between the name-value pairs consists of a Carriage Return character followed by a Line Feed character. If printed, the statistics string looks like:

Rows      2
Sum 16.32
Min 7.31
Max 9.01
Range 1.7
Mean 8.16
Median 8.16
Variance 0.722499999999997
Deviation 0.849999999999998

If GetCursorFieldStatistics is called on a non-numeric field a string is returned in the above format but all values are "0".

If you intend using this method repeatedly on the same cursor you should not open the cursor as 'Forward Only'.

Available: GEO D OD OM SISpy

Group:

Example

Dim rv As String = GisGetCursorFieldStatistics ("MyCursor", 0)

Get the statistics of the first field of the cursor into a string.