SclSwaExists
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.
The SclSwaExists command returns $SCL_TRUE if the SWA of the specified name exists otherwise it returns $SCL_FALSE.
This command is useful to ensure that a specific SWA that may be required by a special SCL application exists to prevent some unexpected error condition from occurring.
Synopsis
SclSwaExists $swaname
Description
Return $SCL_TRUE if the specified SWA exists otherwise return $SCL_FALSE.
Arguments
- $swaname
Passed by value. The name of the SWA for which the existence test is to be performed.
Examples
#
# test for existence of the main graphics layer
#
set status [SclSwaExists "main graphics layer"]
if {$status == $SCL_TRUE} {
puts "main graphics layer exists"
} else {
puts "main graphics layer doesn't exist"
}
|
#
# an alternative test for existence of the main graphics layer
#
if {[SclSwaExists "main graphics layer"] == $SCL_TRUE} {
puts "main graphics layer exists"
} else {
puts "main graphics layer doesn't exist"
}
|
See Also
SclCreateSwa
SclCreateString
SclCreateTriobject
SclDestroy
SclSwaSaveDtmFile
SclSwaSaveStringFile
SclSwaOpenFile
sclSwas