GetLayerDBPos()
Summary
Gets the layer "position" within a geographic file.
Syntax
position = GetLayerDBPos(string layer_name)
| Argument | Contents |
|---|---|
| layer_name | The name of the layer of interest |
Returns
An integer indicating the layer index number within the geographic file, starting from zero.
Notes
-
Line layers are stored in geographic files that have two layers. The first layer represents intersection points, and the second layer represents line features.
-
Some geographic files from earlier versions of Caliper Corporation GIS products also include multiple layers. GetLayerDBPos() provides backward compatibility with those versions of geographic files.
Example
if GetLayerType() = "Line" then do
idx = GetLayerDBPos()
if idx = 0 then ShowMessage("The current layer is the node layer.")
end
Error Codes
| Error Type | Meaning |
|---|---|
| NotFound | The specified layer does not exist |
See Also
| Function | Summary |
|---|---|
| GetLayerType() | Gets the type of a layer |
| GetLayerDB() | Gets the name of the geographic or image file in which a layer is stored |