TCL Command ABRDESIGNROW

Inhalt

Index

Syntax

array set ret [ABRDESIGNROW rowid SETCOL colname value]

array set ret [ABRDESIGNROW rowid GETPACKED]

array set ret [ABRDESIGNROW GETCOUNT]

set rowid [ABRDESIGNROW GETROWID ioff]

Description

Set the result for a specified column in the specified row.

Query the results in the specified row. The results are returned in the order of the result columns. This simplifies tabular evaluation and further processing. The order of the results can be seen in the list of columns (cf. TCL Command ABRDESIGN, List of results).

The entire table of detection results can also be scrolled through. The order of the rows is determined by their position in the table and the set SQL-PRIMARY-KEY.

Argument

Dimension

Meaning

rowid

OBJID

Row-ID; This ID can be queried using other commands (cf. TCL Command ABRELEM, Check and deisgn results).

SETCOL

KEYWORD

Set result of a specified column

GETPACKED

KEYWORD

Query results of all columns

colname

TEXT

Column name of result

value

INT, FLOAT, TEXT

Result value; Values of types "BLOB" or "NULL" are not possible to set.

GETCOUNT

KEYWORD

Query the number of result rows in the table

GETROWID

KEYWORD

Query the row-ID for a given offset

ioff

INT

Row offset in the table according to its SQL-PRIMARY-KEY

Return array for [ABRDESIGNROW ... SETCOL ... ]

Array item

Dimension

Meaning

error

INT

Error code

info

TEXT

Error information

Return array for [ABRDESIGNROW ... GETPACKED]

Array item

Dimension

Meaning

error

INT

Error code

info

TEXT

Error information

elem

INT

Element number

node

INT

Node number

resname

TEXT

Name of the result

resset

TEXT

Name of the results set

resgroup

TEXT

Name the result group

values

LIST

List of result values in the order of columns; Columns with value NULL are returned as text "NULL" and columns with value BLOB are returned as text "BLOB". Results of the type FLOAT are entered into the list in the format "%-.9g".

Return array for [ABRDESIGNROW GETCOUNT]

Array item

Dimension

Meaning

error

INT

Error code

info

TEXT

Error information

count

INT

Query the number of result rows in the table

Return for [ABRDESIGNROW GETROWID ... ]

Return

Dimension

Meaning

rowid

OBJID

Row-ID or 0

Scopes

All

Examples

# insert row

array unset insret

array set insret [ABRELEM 111 INS DESIGN "Combination X" "Foreign" "" ATNODE 1]

# update a value

array unset updret

array set updret [ABRDESIGNROW $insret(id) SETCOL "XResult" 111.222]

One result row for element 111 and node 1 is inserted for a fictitious result "Combination X" . Then the value for the existing column "XResult” is set.

# output table results in a packed way (the output rows follow the sequence of rescols

set rescols [ABRDESIGN GET RESULTS]

set count [llength $rescols]

set head2 " "

set head3 " ---------------------------------------------------------------------------------------"

set format3 " %7s %4s %-13s %-13s %-13s"

set format4 " %13s"

set format5 $format3

set head1 [format $format3 "Element" "Node" "Result name" "Result set" "Result group"]

foreach colname $rescols {

array unset column

array set column [ABRDESIGN $colname GET]

append head1 [format $format4 $column(longname)]

append head2 [format $format4 $column(usymb)]

append head3 "--------------"

}

# get all rows for element 111

set rows [ABRELEM 111 GETROWID DESIGN]

set nrow [llength $rows]

for { set irow 0 } { $irow < $nrow } { incr irow } {

set rowID [lindex $rows $irow]

if { $rowID == 0 } { break }

array unset row

array set row [ABRDESIGNROW $rowID GETPACKED]

set outline [format $format5 $row(elem) $row(node) $row(resname) $row(resset) $row(resgroup)]

set nvalue [llength $row(values)]

foreach value $row(values) { append outline [format $format4 $value] }

puts $outfile $outline

}

It is assumed that a text file outfile has been opened for writing . The result data is written formatted into the text file. All results of element 111 are queried and output here. The output in the text file depends on the project and could look like the following:

Element Node Result name Result set Result group ASuser ASmax Aswuser My result

[cm²] [cm²] [cm²/m] [kN/m²]

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

111 1 NULL NULL NULL NULL

111 1 Long-Bott Reinforcement 109.9 109.9 NULL NULL

111 1 Long-Top Reinforcement 0 0 NULL NULL

111 1 Long-WebL Reinforcement 0 0 NULL NULL

111 1 Long-WebR Reinforcement 0 0 NULL NULL

111 1 Shear-WebL Reinforcement NULL NULL 40.212386 NULL

111 1 Shear-WebR Reinforcement NULL NULL 40.212386 NULL

111 1 Torsion Reinforcement NULL NULL 26.8082573 NULL

111 1 Combination X Foreign NULL NULL NULL 111.222

111 2 NULL NULL NULL NULL

111 2 Long-Bott Reinforcement 109.9 109.9 NULL NULL

111 2 Long-Top Reinforcement 0 0 NULL NULL

111 2 Long-WebL Reinforcement 0 0 NULL NULL

111 2 Long-WebR Reinforcement 0 0 NULL NULL

111 2 Shear-WebL Reinforcement NULL NULL 40.212386 NULL

111 2 Shear-WebR Reinforcement NULL NULL 40.212386 NULL

111 2 Torsion Reinforcement NULL NULL 26.8082573 NULL

111 2 Combination X Foreign NULL NULL NULL 222.333

array set retval [ABRDESIGNROW GETCOUNT]

set count $retval(count)

puts $outfile ""

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

puts $outfile "Number of design result rows in table: $count"

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

puts $outfile ""

puts $outfile $head1

puts $outfile $head2

puts $outfile $head3

for { set irow 0 } { $irow < $count } { incr irow } {

set rowID [ABRDESIGNROW GETROWID $irow]

if { $rowID == 0 } { break }

array unset row

array set row [ABRDESIGNROW $rowID GETPACKED]

set outline [format $format5 $row(elem) $row(node) $row(resname) $row(resset) $row(resgroup)]

set nvalue [llength $row(values)]

foreach value $row(values) { append outline [format $format4 $value] }

puts $outfile $outline

}

It is assumed that a text file outfile has been opened for writing . The headers are set as in the example above. The tabular output of the check and design results of all elements into a text file takes place, compare also the example above.



Allplan

(C) ALLPLAN GmbH

Privacy policy