Syntax
array set func [ABMFUNCTION funcid GET]
array set curve [ABMFUNCTION funcid GET CURVE]
Description
Query the function data
Query the list of the curve items of a table
Argument |
Dimension |
Meaning |
funcid |
OBJID |
Object-ID of the function |
GET |
KEYWORD |
Query data |
CURVE |
KEYWORD |
Query the list of table items |
Return array for [ABMFUNCTION ... GET]
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 |
Function type (“TABLE”, “VAR”) |
constx |
INT |
Abscissa: 0 – not constant, 1 - constant |
consty |
INT |
Ordinate: 0 – not constant, 1 - constant |
expr |
TEXT |
Mathematical expression of a formula (Type "VAR") |
Return array for [ABMFUNCTION ... GET CURVE]
Array item |
Dimension |
Meaning |
error |
INT |
Error code |
info |
TEXT |
Error information |
first |
OBJID |
Object-ID of the first list element |
last |
OBJID |
Object-ID of the last list element |
count |
INT |
Number of list elements |
Scopes
All
Examples
array set calc [ABMCALC GET LIST]
if { $calc(count) > 0 } {
set ID $calc(first)
for { set ifunc 0 } { $ifunc < $calc(count) } { incr ifunc } {
if { $ifunc > 0 } { set ID [OBJNEXT $ID] }
array unset func
array set func [ABMFUNCTION $ID GET]
ABMINFO " "
ABMINFO " Function " $func(name) ":"
ABMINFO " -------------------------"
foreach {key value} [array get func] {
if { $key == "id" } continue
ABMINFO " " $key " = " $value
}
}
}
The list of tables and formulas is queried. If the number of functions is greater than zero, then the list is run through in a for loop. The concurrent ID is incremented from the 2nd pass. The data of each function is logged.
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 has already been set in advance. The table data is written formatted into the text file.
|
(C) ALLPLAN GmbH |
Privacy policy |