Maptitude GISDK Help

RenameLayer()

Summary

Changes the name of a layer.

 

Syntax

new_name = RenameLayer(string map_layer, string new_layer_name, array options)

 

Argument

Contents

map_layer

The fully specified layer name

new_layer_name

The requested new layer name

 

Option

Type

Contents

Permanent

Boolean

If "True" permanently changes the layer name as stored in the geographic file

 

Returns

A string indicating the name actually assigned to the layer.

 

Notes

Example

new_name = RenameLayer("U.S. States", "The 50 States Plus DC", )

 

new_name = RenameLayer("foo", "aaaaaaaaaabbbbbbbbbbccccccccccdddddddddd",)

// Renames layer in session to "aaaaaaaaaabbbbbbbbbbccccccccccd"

// Internal name will remain "foo"

 

new_name = RenameLayer("foo", "aaaaaaaaaabbbbbbbbbbccccccccccdddddddddd", {{"Permanent", "True"}})

// Renames layer in session to "aaaaaaaaaabbbbbbbbbbccccccccccd"

// Internal name will become "aaaaaaaaaabbbbbbbbbb"  

 

Error Codes

Error Type

Meaning

Error

New_layer_name is null or an option value is invalid.

NotFound

The specified layer does not exist

 

See Also

Function

Summary

SetMapTitle()

Sets the title of a map

RenameSet()

Changes the name of a selection set

 

 

©2025 Caliper Corporation www.caliper.com