You are here: Surpac Concepts > Macros > SCL > Object Manipulation > SclGetAttributeNames
GEOVIA Surpac

SclGetAttributeNames

Overview

This command returns a list of all the named attributes in a trisolation.

Synopsis

set names $TrisolationHandle SclGetAttributeNames

Description

Returns a Tcl list of the names of attributes from the header record of the specified trisolation. If there are no attributes, an empty list is returned.

"name=value" pairs are saved in the object/trisolation file using a comma as the separator. A comma "," character is not permitted as part of a value.

Arguments

Argument Description
$TrisolationHandle Handle to the trisolation for which to retrieve the named attributes. Passed by value.

Returns

This command returns a list in which each element is the name of a named attribute in a trisolation.

Examples

# Outputs to the Message window the name of each named attribute\
 in each trisolation in the active layer
SclGetActiveViewport ViewportHandle
$ViewportHandle SclGetActiveLayer SwaHandle
$SwaHandle SclGetTriobjects TriobjectsHandle
$TriobjectsHandle SclIterateFirst TriobjectsIterator
while {[$TriobjectsIterator SclIterateNext TriobjectHandle] == $SCL_TRUE} {
  $TriobjectHandle SclIterateFirst TrisolationIterator
  while {[$TrisolationIterator SclIterateNext TrisolationHandle] == $SCL_TRUE} {
    set names [$TrisolationHandle SclGetAttributeNames]
    puts "Triobject [$TriobjectHandle SclGetId], Trisolation [$TrisolationHandle SclGetId]"
    foreach name $names {	
      puts "$name"
    }
  }
}					
					
See also