All Cadcorp SIS API Methods

OpenOverlayCursor Method

Description

Opens a new cursor containing specified fields for all items in an overlay.

Syntax

Visual Basic
Public Function OpenOverlayCursor( _
   ByVal cursor As String, _
   ByVal pos As Long, _
   ByVal fields As String, _
   ByVal bForwardOnly As Long _
) As Integer

Parameters

cursor
The named cursor to be created with the specified fields for all items in an overlay. Any existing cursor with this name will be overwritten.
 
pos
The position in the overlays list of the overlay from which to fill the cursor.
 
fields
The list of fields to be included in the cursor. Field names should be as they appear in the expression box within SIS and should be TAB-separated.
 
bForwardOnly
True    you can pass forward only through the records (a Forward-Only cursor is slightly more efficient)
False    you can navigate forwards and backwards through the records at will.

Remarks

OpenOverlayCursor inserts a row into the cursor for every item in the whole overlay.

In the case of dynamically connected cursor-based datasets, e.g. a Spatial Table in Oracle, the overlay is deemed to be the whole Spatial Table and so OpenOverlayCursor will create a cursor for the whole Spatial Table which might be undesirable.

When a cursor is opened the current reading position is at the start of the cursor.

A cursor can be opened onto the schema columns by leaving the fields parameter empty.

Available: GEO D OD OM SISpy

Group:

Example

VB.net:

sis.OpenOverlayCursor ( "MyCursor", 1, "_area#" & vbTab & "UPRN$" & vbTab & "BDRMS&", FALSE )

Python:

cursor_columns = ["_area#", "UPRN$", "BDRMS&"]
sis.OpenOverlayCursor ( "MyCursor", 0, "\t".join(cursor_columns), False)

Note: vbTab, used in VB.net, is not valid in Python and is replaced with "\t", this is the same for C#.

This example creates a cursor called MyCursor which will contain three columns - the system property _area# and two user-defined properties.

The cursor will be populated from items on overlay number 1 and will contain a row for every item in that overlay. It is possible to navigate forwards and backwards through this cursor to visit or revisit any row.