TCL Command ABMCALC

Inhalt

Index

Syntax

array set calc [ABMCALC GET LIST]

set funcID [ABMCALC GET FUNCTION funcname]

Description

Query the tables and formulas of the project

Query the existence of a specific function

Argument

Dimension

Meaning

GET

KEYWORD

Query data

LIST

KEYWORD

Query the list

FUNCTION

KEYWORD

Query table ID or formula ID or their existence

funcname

TEXT

Name of table or formula (arg2 = FUNCTION)

Return array for [ABMCALC GET LIST]

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

Return for [ABMCALC GET FUNCTION funcname]

Return

Dimension

Meaning

funcID

OBJID

Table ID or formula ID; 0, if not exists

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.

# find a table

set tabID [ABMCALC GET FUNCTION "webwidth"]

if { $tabID == 0 } {

set error "Tabelle 'webwidth' nicht gefunden."

LOGERROR $error

}

The ID of the table "webwidth” is requested and if the table does not exist, an error message is written.



Allplan

(C) ALLPLAN GmbH

Privacy policy