You are here: Surpac Concepts > Macros > SCL > Viewport and Layers > SclViewport > SclViewport getActiveLayer
GEOVIA Surpac

SclViewport getActiveLayer

Overview

You use this command to determine the active layer of a viewport, as identified by the reference handle.

Synopsis

SclViewport getActiveLayer <$viewportHandle>

Description

Get the active layer for the viewport referred to by the handle. A viewport always has an active layer.

Arguments

  • getActiveLayer
  • A literal string to identify the function.

  • <$viewportHandle>
  • The reference handle to the viewport to return the active layer for.

Returns

This command returns the handle to the active layer. If the viewport handle is not valid, an error message is returned.

Examples

# Get the active layer for the viewport
set vp [SclViewport getActive]
set layer [SclViewport getActiveLayer $vp]
puts "The active layer is [$layer SclGetId]"