User Tools

Site Tools


Table of Contents

ITGIS_LayerVector.GetShape_2 method

DK11 for ActiveX | TatukGIS_XDK11.ITGIS_LayerVector.GetShape_2 | Methods | Properties

Gets a shape by unique identifier.

Available also on: Delphi | .NET | Java | Python.


// C#
public ITGIS_Shape GetShape_2(
  OleVariant _uid,
  int _cursor
' VisualBasic
Public Function GetShape_2(
  ByVal _uid As OleVariant,
  ByVal _cursor As Integer
) As ITGIS_Shape
// Oxygene
  function GetShape_2(
    _uid : OleVariant;
    _cursor : Integer
  ) : ITGIS_Shape;


Name Type Description
_uid OleVariant identifier /same as current record for SHP file/
_cursor int
cursor allocated by cursorOpen()


Type Description
ITGIS_Shape Shape itself or nil.


Use this method to get a shape by using its unique id. We can locate a shape by id, change or read its attributes, etc. See example.

When using this operation, never call any function which uses FindFirst..FindNext (any function which iterates through the shapes using it - so never use inside an operation like Locate etc.).

The GetShape returns a weak reference to an internal shape of the current cursor, therefore is not permanent. Another call of GetShape will change this reference. To get a strong reference, call MakeEditable() or CreateCopy() on a shape.

2022/11/16 01:10

Page Tools