Cadcorp SIS API Methods

CreateItemB Method

Description

Creates an Item from Blob data. If a Group is open, then graphics are added to the Group, otherwise a new Item is created.

Syntax

Visual Basic
Public Function CreateItemB( _
   ByVal blob As Variant, _
   ByVal projection As String, _
   ByVal fmt As Integer _
) As Integer

Parameters

blob
The stored Item Blob data, stored in an array of bytes, or in a stream.
 
projection
The named Coordinate Reference System of the stored Item Blob.
 
fmt

The format of the stored Item Blob.

SIS_BLOB_SIS_V6_ASCII 0 = Cadcorp SIS format
SIS_BLOB_OGIS_WKB 1 = OGC Well-Known-Binary format
SIS_BLOB_OGIS_WKT 2 = OGC Well-Known-Text format
SIS_BLOB_OGIS_GML 3 = OGC Geographic Markup Language
SIS_BLOB_ESRI_SHP 4 = ESRI Shape (*.shp)
SIS_BLOB_SIS_BIN_ITEM 5 = Binary item
SIS_BLOB_GEOJSON 6 = Geographic Objects for JSON format

Remarks

If a group is open, graphics are added to the group, otherwise a new item is created. When modifying an item which is stored as a Blob in a database, it is good practice to create a temporary version of the item on an editable overlay, and only commit the changes to the database, having got the new Blob string using GetBlob, when the user is satisfied with the changes.

This allows any changes to other columns in the database table to be done in the same transaction.

Available: GEO OM OD

Group:

Example

sis.CreateItemB (blob, "*APrjNatGrid", SIS_BLOB_SIS)

Creates an item on the current overlay using the value of blob


Send comments on this topic.

Click to return to www.cadcorp.com

© Copyright 2000-2017 Computer Aided Development Corporation Limited (Cadcorp).