TCL Command ABMTABITEM

Inhalt

Index

Syntax

array set item [ABMTABITEM itemid GET]

Description

Query the data of a specific table item

Argument

Dimension

Meaning

itemid

OBJID

Object-ID of item

GET

KEYWORD

Query data

Return array

Array item

Dimension

Meaning

error

INT

Error code

info

TEXT

Object or error information

id

OBJID

Object-ID

name

TEXT

Name of the function

type

ENUM

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

cx

INT

Abscissa value or expression

cy

INT

Ordinate value or expression

Scopes

All

Examples

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)]

}

}

}

It is assumed that a text file outfile has been opened for writing . The table ID is requested for the table of the response spectrum "Spectrum_1” . The table data is written formatted into the text file.



Allplan

(C) ALLPLAN GmbH

Privacy policy