gis:layer-remove-attribute


(gis:layer-remove-attribute  layerId  name)

This function removes the 'GIS Attribute' as specified by name from the 'GIS Layer' object specified by layerId.

Arguments

layerId  (integer)  'handle' identifier of the 'GIS Layer' to remove the 'GIS Attribute' from
name  (string) the name of the 'GIS Attribute' to be removed (case-insensitive)

Return

T on success, 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 attributes (gis:layer-get-attributes layerId))  ("id" "name" "int_number" "dec_number" "date")
(gis:layer-has-attribute layerId "NewId")  NIL

(gis:layer-add-attribute layerId (list "NewId" 3 "---empty---"))  T

(setq attributes (gis:layer-get-attributes layerId))  ("id" "name" "int_number" "dec_number" "date" "NewId")
(gis:layer-has-attribute layerId "NewId")  T

(gis:layer-remove-attribute layerId "newid")  T
(gis:layer-has-attribute layerId "NewId")  NIL

Remarks

a 'GIS Feature Attribute' represents a "Column" in the GIS Database table; each 'GIS Feature' (built-up from dwg entities) is a row in such table;
the 'GIS Feature Attribute' name string is always handled as case-insensitive !



©  Bricsys NV. All rights reserved.