TCL Command ABMTABITEM

Syntax

array set item [ABMTABITEM itemid GET]

Beschreibung

Abfrage der Daten eines bestimmten Tabelleneintrages

Argument

Dimension

Bedeutung

itemid

OBJID

Objekt-ID des Eintrages

GET

KEYWORD

Daten abfragen

Rückgabefeld

Feldargument

Dimension

Bedeutung

error

INT

Fehlerstatus

info

TEXT

Objekt- oder Fehlerinformation

id

OBJID

Objekt-ID

name

TEXT

Name der Funktion

type

ENUM

Kurventyp (“FREE”, “LINE”, “PARA00”, “PARA0B”, “PARA0E”, “SPLINE”), s. Scope CALC/CURVE

cx

INT

Abszissenwert oder -ausdruck

cy

INT

Ordinatenwert oder -ausdruck

Scopes

All

Beispiele

set tabID [ABMCALC GET FUNCTION "Spectrum_1"]

if { $tabID == 0 } {

LOGERROR "Table 'Spectrum_1' not found."

} else {

puts $outfile "Table 'Spectrum_1'"

puts $outfile "------------------"

array unset func

array set func [ABMFUNCTION $ID GET]

puts $outfile ""

puts $outfile " Information: $func(info)"

puts $outfile " Constant-X : $func(constx)"

puts $outfile " Constant-Y : $func(consty)"

# export all curve elements

array set curve [ABMFUNCTION $ID GET CURVE]

if { $curve(count) > 0 } {

set format1 " %-12s %30s %30s"

puts $outfile ""

puts $outfile " Table elements"

puts $outfile " --------------"

puts $outfile ""

puts $outfile " Type X Y"

puts $outfile " --------------------------------------------------------------------------"

set elemID $curve(first)

for { set ielem 0 } { $ielem < $curve(count) } { incr ielem } {

if { $ielem > 0 } { set elemID [OBJNEXT $elemID] }

array unset elem

array set elem [ABMTABITEM $elemID GET]

puts $outfile [format $format1 $elem(type) $elem(cx) $elem(cy)]

}

}

}

Es wird angenommen, dass eine Textdatei outfile zum Schreiben geöffnet wurde. Die Tabellen-ID wird für die Tabelle des Antwortspektrums "Spectrum_1" abgefragt. Die Tabellendaten werden formatiert in die Textdatei geschrieben.