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

SclViewport Action

Overview

You use this command to clear data, erase data, rotate the view, or zoom the view of the viewport.

Synopsis

SclViewport Action <$viewportHandle>

Description

The SclViewport command allows you to perform a number of actions on the viewport including clearing and erasing items, rotating the view, and zooming the view. The available actions are described below.

Action Function Description
clear Erases all visible items in the viewport.
SclViewport clear $viewportHandle
eraseTemporaryMarkers Erases all temporary markers in the viewport
SclViewport eraseTemporaryMarkers $viewportHandle
eraseGrid Erases a 2D grid if it is visible in the viewport
SclViewport eraseGrid $viewportHandle
erase3DGrid Erases a 3D grid if it is visible in the viewport
SclViewport erase3DGrid $viewportHandle
plan Places all visible data in the viewport into plan view
SclViewport plan $viewportHandle
section Places all visible data in the viewport into section view
SclViewport section $viewportHandle
longSection Places all visible data in the viewport into longSection view
SclViewport longSection $viewportHandle
zoomAll Places all visible data in the viewport into plan view and zoom to the data extents
SclViewport zoomAll $viewportHandle
zoomIn Zooms in by the currently set zoom factor. The zoom factor can by queried and set using the SclSetValueByName and SclGetValueByName functions.
SclViewport zoomIn $viewportHandle
zoomOut Zooms out by the currently set zoom factor. The zoom factor can by queried and set using the SclSetValueByName and SclGetValueByName functions.
SclViewport zoomOut $viewportHandle
orbitUp Orbits the view up by the current rotation increment. The rotation increment can by queried and set using the SclSetValueByName and SclGetValueByName functions.
SclViewport orbitUp $viewportHandle
orbitDown Orbits the view down by the current rotation increment. The rotation increment can by queried and set using the SclSetValueByName and
SclViewport orbitDown $viewportHandle
orbitLeft Orbits the view left by the current rotation increment. The rotation increment can by queried and set using the SclSetValueByName and
SclViewport orbitLeft $viewportHandle
orbitRight Orbits the view right by the current rotation increment. The rotation increment can by queried and set using the SclSetValueByName and
SclViewport orbitRight $viewportHandle
rollLeft Rolls the view left by the current rotation increment. The rotation increment can by queried and set using the SclSetValueByName and
SclViewport rollLeft $viewportHandle
rollRight Rolls the view right by the current rotation increment. The rotation increment can by queried and set using the SclSetValueByName and
SclViewport rollRight $viewportHandle
resetView Resets all values, such as the zoom factor and rotation increment, to their default values, places the viewport into plan view, and zooms to the data extents.
SclViewport resetView $viewportHandle

Arguments

  • Action
  • A literal string to identify the function. Valid values are listed in the previous table.

  • <$viewportHandle>
  • The reference handle to the viewport of interest.

Returns

If successful, this command returns $SCL_OK. If the viewport handle is not valid, an error message is returned.