You are here: Surpac Concepts > Macros > SCL > SWA Commands > SclGetTriobjects
GEOVIA Surpac

SclGetTriobjects

Overview

The SWA (Surpac Work Area) is where all String and DTM data processed by Surpac applications is stored. A complete description of the SWA can be found here.

A SWA contains a set of triobjects each of which contains a set of trisolations. To perfrom operations on the triobjects in a SWA you must obtain the handle to the set of triobjects in a SWA. This command performs this task.

Synopsis

$SwaHandle SclGetTriobjects TriobjectsHandle

Description

Assign the handle to the set of triobjects to the TriobjectsHandle variable for the SWA represented by the SwaHandle variable.

Arguments

  • SwaHandle
  • This variable must represent a SWA.

  • TriobjectsHandle
  • Passed by reference. This variable will be assigned the handle to the set of triobjects for the specified SWA.

Examples

#
# This example shows how a count of the number of triobjects in the SWA
# can be obtained and also how a triobject at a specified position in the
# SWA can be obtained and assigned to a variable
#
SclGetActiveViewport ViewportHandle
$ViewportHandle SclGetActiveLayer SwaHandle
$SwaHandle SclGetTriobjects TriobjectsHandle
set count [$TriobjectsHandle SclCountItems]
puts "There are $count triobjects in the Swa"
for {set i 0} {$i < $count} {incr i} {
  $TriobjectsHandle SclGetItem TriobjectHandle $i
  puts "The triobject at position $i is [$TriobjectHandle SclGetId]"
}