User Tools

Site Tools


api:dk11:delphi:gislayervector.tgis_layervector.getshape_tgis_uid_integer

TGIS_LayerVector.GetShape(TGIS_Uid; Integer) method

DK11 for Delphi | GisLayerVector.TGIS_LayerVector.GetShape | Overloads | Constructors | Fields | Methods | Properties | Events

Get shape by unique identifier.

Available also on: .NET | Java | ActiveX.

Syntax

// Delphi
public
  function GetShape(
    const _uid : TGIS_Uid;
    const _cursor : Integer
  ) : TGIS_Shape; overload; virtual;
// C++ Builder
public:
  virtual TGIS_Shape* GetShape(
    TGIS_Uid* const _uid,
    const int _cursor
  ) /* overload */;

Parameters

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

Result

Type Description
TGIS_Shape Shape itself or nil/

Remarks

Use this method to get a shape having 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, PaintScope, etc.).

References

2018/02/17 00:09