gis:layer-rename-attribute


(gis:layer-rename-attribute  layerId  oldName  newName)

This function renames the 'GIS Attribute' as specified by oldName to a new name newName in the 'GIS Layer' object specified by layerId.

Arguments

layerId  (integer)  'handle' identifier of the 'GIS Layer'
oldName  (string) the name of the 'GIS Attribute' to be renamed (case-insensitive)
newName  (string) the new name for the 'GIS Attribute'

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-rename-attribute layerId "ID" "NewId")  T
(setq attributes (gis:layer-get-attributes layerId))  ("NewId" "name" "int_number" "dec_number" "date")

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.