TCL - Explanations to scope and command descriptions

Inhalt

Index

Scopes and commands are distinguished. A scope can contain scopes and commands. A command consists of only one line, where TCL allows to continue a line by using the character '\' as line end after the line break.

Syntax

COMMAND arg1 arg2 ...

Each command starts with its name in capital letters, followed by its arguments. The number and types of arguments vary. In certain cases, the arg-i determines the rules on its follow-up arguments.

Description

Description of the respective scope or command.

Arguments

Minimum quantity: Scopes and commands usually have a minimum number of arguments.

arg1

Value

Dimension

Meaning

text

TEXT

Any text; Special characters must be marked with the escape character '\'. A text without spaces does not require quotes “”.

int

INT

An integer number is expected.

key

KEYWORD

A prescribed keyword is expected.

double

DOUBLE

A real number is expected.

double

ANGLED, LCROSSD, LSTRUCTD, STATION, etc.

A dimensional number is expected (cmp. PROJECT/NIT)

fraction

LCROSSD, LSTRUCTD, STATION

For selected commands, using imperial units, the values can be entered in "feet-inches" representation.

guid

GUID

GUID as character string

word

ENUM

Keyword of an enumeration is expected.

[XFTS s001 s010 1]

XFTS

A series of numbered stations is expected (SPOINT command only)

objid

OBJID

Temporary ID of an AllplanBridge object for further processing in the script; the validity of the ID ends with the execution of the script. Only for model and result access.

Return values

The commands of the TCL scope ABM do not return any result. In case of a TCL syntax error or any other fatal error for further processing, the script will be aborted.

The commands with access to existing model and result data always have a return value and are executed in the form "[COMMAND arg1 arg2 ....]". It is therefore possible and useful to check the correctness of the execution of such a command.

arg1

Value

Dimension

Meaning

text

TEXT

Any text; Special characters must be marked with the escape character '\'. A text without spaces does not require quotes “”.

int

INT

An integer number is expected.

key

KEYWORD

A prescribed keyword is expected.

double

DOUBLE

A real number is expected.

double

ANGLED, LCROSSD, LSTRUCTD, STATION, etc.

A dimensional number is expected (cmp. PROJECT/NIT)

objid

OBJID

Temporary ID of an AllplanBridge object for further processing in the script; the validity of the ID ends with the execution of the script.

tcllist

LIST

List of return values

ablist

ABLIST

List of AllplanBridge objects as TCL-array; Call of command by "array set ret [COMMAND ....]"; The content of the returned field contains the arguments ret(first), ret(last), ret(count), ret(error), ret(info).

tclarr

ARRAY

Call of command by "array set ret [COMMAND ....]"; The content of the returned field contains the arguments ret(arg1), ret(arg2), ... The names of the arguments depend on the respective command.

Scopes

Scopes in which the current scope or command can be used.

Examples

COMMAND .

Command example.



Allplan

(C) ALLPLAN GmbH

Privacy policy