SclIsSwaGraphicsLayer
Overview
Some SWAs are treated as special SWAs because they are used as graphics layers in the 3D Graphics module. It may be necessary in the development of some Scl applications to be certain that the SWA handle being used is also a Graphics layer. This function serves that purpose.
Synopsis
$SwaHandle SclIsSwaGraphicsLayer
Description
Returns $SCL_TRUE if the SWA represented by $SwaHandle is a graphics layer otherwise it returns $SCL_FALSE.
Arguments
- SwaHandle
The variable must be a valid handle to a SWA.
Returns
$SCL_TRUE if the SWA is a graphics layer.
$SCL_FALSE if the SWA is not a graphics layer
Examples
#
# Iterate over all SWAs and display the name of the SWA and whether
# or not it is a graphics layer in the message window.
#
# Run this script after loading a DTM file into a graphics layer
# to see how it works.
#
sclSwas SclIterateFirst IteratorHandle
while {[$IteratorHandle SclIterateNext SwaHandle] == $SCL_TRUE} {
if {[$SwaHandle SclIsSwaGraphicsLayer] == $SCL_TRUE} {
puts "Swa name >[$SwaHandle SclGetId]< is a graphics layer"
} else {
puts "Swa name >[$SwaHandle SclGetId]< is not a graphics layer"
}
}
|