gis:layer-add-feature


(gis:layer-add-feature  layerId  entity|entityList)

This function adds the single entity (ename) or the list of entities entityList (list of ename) as a 'GIS Feature' to the 'GIS Layer' object specified by layerId, and returns the newly created 'GIS Feature' identifier.

Arguments

layerId  (integer)  'handle' identifier of the 'GIS Layer' to contain the new 'GIS Feature'
entity  (ename)  the single entity to be added as a 'GIS Feature' to the specified 'GIS Layer'
--- or ---
entityList  (list of ename)

Return

INTEGER or NIL

Example

(vl-load-gis)  T
(setq layers (gis:get-layers))  ("shp_3857_point_2d_utf8")
(setq name (car layers))  "shp_3857_point_2d_utf8"
(setq layerId (gis:get-layer name))  1736947670764

(setq ent (car (entsel)))  <Entity name: 560dbc70>
(setq feature (gis:layer-add-feature layerId ent))  1736947670765

(setq features (gis:layer-get-features layerId))  (1685094904232 1685094904233 1736947670765 1736947670766)

Remarks




©  Bricsys NV. All rights reserved.