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

SclViewport restore

Overview

You use this command to return a viewport, which you have maximised, back to its original size settings.

Synopsis

SclViewport restore <$viewportHandle>

Description

Restore the previously maximised viewport referred to by the viewport handle. When a viewport is restored from a maximised state it will return to its original size and position. If the viewport is not maximised no action is taken.

Arguments

  • restore
  • A literal string to identify the function.

  • <$viewportHandle>
  • The reference handle to the viewport to be restored.

Returns

This command returns $SCL_OK.

Examples

# Maximise and restore a viewport
set vp1 [SclViewport getActive]
set vp2 [SclViewport split vertical 30 $vp1 ]
set vp3 [SclViewport split horizontal 50 $vp2 ]
puts "Click the mouse to maximise viewport 3"
SclPause
SclViewport maximise $vp3
puts "Click the mouse to restore viewport 3"
SclPause
SclViewport restore $vp3