TCL Command ABRELEM, Check and deisgn results

Inhalt

Index

Syntax

array set rescol [ABRELEM number GET DESIGN resname resset resgroup ATNODE k]

set rowid [ABRELEM number EXIST DESIGN resname resset resgroup ATNODE k]

array set ret [ABRELEM number INS DESIGN resname resset resgroup ATNODE k]

array set ret [ABRELEM number DEL DESIGN resname resset resgroup ATNODE k]

set rowlist [ABRELEM number GETROWID DESIGN]

set rowlist [ABRELEM number GETROWID DESIGN resname]

set rowlist [ABRELEM number GETROWID DESIGN ATNODE k]

set rowlist [ABRELEM number GETROWID DESIGN resset]

set rowlist [ABRELEM number GETROWID DESIGN resname resset]

Description

Query the data for a specific result; missing arguments are replaced by default values.

Query the existence of a specific result (1 result row)

Insert a new result; Missing arguments are replaced by default values.

Delete existing results; The arguments after DESIGN determine the SQL-WHERE clause.

Currently, 5 variants of queries of the result rows for further processing are possible. The IDs in the ID list rowlist are needed to query the result row(s).

Argument

Dimension

Meaning

number

INT

Element number

GET

KEYWORD

Query data

EXIST

KEYWORD

Existence check

INS

KEYWORD

Inserting a new result

DEL

KEYWORD

Deleting an existing result

GETROWID

KEYWORD

Query the result rows

DESIGN

KEYWORD

Query the check and design results

resname

TEXT

Name of the result

resset

ENUM

Name of the reference set if applicable

resgroup

ENUM

Name of the result group if applicable

ATNODE

KEYWORD

The node number follows as the next argument

k

INT

Element node (1,2,...)

Return array for [ABRELEM ... GET DESIGN ... ]

Array item

Dimension

Meaning

error

INT

Error code

info

TEXT

Error information

res1, res2, …

INT, FLOAT, TEXT, BLOB, NULL

The array items are named according to the results. A result can be of different types. If the result is of type BLOB, it cannot be read and the value is returned as "BLOB". If the entry in the table is missing, then "NULL" is returned as the value.

Return for [ABRELEM ... EXIST DESIGN ... ]

Return

Dimension

Meaning

rowid

OBJID

Row-ID or 0

Return array for [ABRELEM ... INS DESIGN ... ]

Array item

Dimension

Meaning

error

INT

Error code

info

TEXT

Error information

rowid

OBJID

ID of the inserted line or 0; If the line already exists, the existing line is returned and error status 10 is set.

Return array for [ABRELEM ... DEL DESIGN ... ]

Array item

Dimension

Meaning

error

INT

Error code

info

TEXT

Error information

Return for [ABRELEM ... GETROWID DESIGN ... ]

Return

Dimension

Meaning

rowlist

LIST

List of row-IDs

Scopes

All

Examples

puts $outfile ""

puts $outfile " Element 101, node 1, Torsion Reinforcement:"

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

set format2 " %s = %s"

array unset row

array set row [ABRELEM 101 GET DESIGN "" Torsion Reinforcement ATNODE 1]

foreach {key value} [array get row] {

puts $outfile [format $format2 $key $value]

}

It is assumed that a text file outfile has been opened for writing . The result data is written formatted into the text file. Here all results of element 101 at node 1 for "Torsion" and Gruppe "Reinforcement" are queried.

The output is project-dependent and can look like the following, for example:

Element 101, node 1, Torsion Reinforcement:

-------------------------------------------

BLZ = NULL

A3 = NULL

info =

A4 = 26.8082573

A1 = NULL

error = 0

XResult = NULL

BLY = NULL

Va = NULL

A6 = 26.8082573

Output for script above.

set myresname "Combination X"

array set insret [ABRELEM 111 INS DESIGN $myresname "Foreign" "" ATNODE 1]

ABMWARN "Insert $myresname for element 111, node 1: $insret(info)"

The result "Combination X", set "Foreign" for element 111 and node 1 is inserted, if it does not already exist. The insertion is logged.

# delete all rows referring to "Combination X"

array set delret [ABRELEM 0 DEL DESIGN "Combination X"]

ABMWARN "$delret(info)"

All rows belonging to result "Combination X" are deleted. The deletion is logged.

set rows [ABRELEM 111 GETROWID DESIGN]

set nrow [llength $rows]

All result rows of element 111 are queried. The length nrow of list rows of row-IDs is determined.



Allplan

(C) ALLPLAN GmbH

Privacy policy