Working in ARCHline.XP you will execute most commands with the graphic tools, icons and menus, consequently you don’t need to know the command syntax. You can execute most of basic commands in this way.
General Rules of Syntax
This description contains the instructions in the format it should be entered.
1. In one command string there can be only one main command and an arbitrary number of other commands. Other commands (subcommands) can be placed before or after the main command or inserted between any two syntactic elements, a subcommand can be also broken by a new subcommand.
2. A string can contain a text. The text must appear within quotation marks: "This is a text".
3. If the text does not contain prompts, then ARCHline.XP will use the standard prompt. You can redefine a prompt. The new prompt must appears within single quotation marks:
e.g.: #REPEAT 'Number of copies' #DUPLICATE ....
4. The number sign "#" preceding a word instructs ARCHline.XP to interpret the following word as a keyword. Using number sign before every keyword is strongly recommended; because using it lets you issue a command even when ARCHline.XP waiting for a text and it is easier to read the list of the command.
5. A semicolon (;) is equivalent to the #ENTER command.
6. The syntactic element of the command lines should be separated by one or more space " " characters.
7. The arithmetical and logical expressions should be given in brackets "( )". An expression may contain any number of spaces.
8. There is no difference between the upper and lower case characters in keywords, group names and file names,
9. File, group names:
The names must start with a letter, followed by arbitrary characters:
file name : max. 255 character (with full path name),
group name: max. 50 character,
10. Wildcards in file name and group names:
%: any one character,
*: any number of characters following the position of asterisk.
11. The length of command lines is unlimited.
The Rules of Syntax Description
[...] The indicated item is optional, it can be omitted.
{...|...|... ...} One of the listed elements must be selected.
<...> The indicated item can be repeated any number of times but at least once.
(…)x The indicated item must be entered exactly x times.
$...$ The indicated item is an alias. It should be replaced by the referenced section.
The UPPERCASE strings in the commands are keywords; they have to be entered exactly as written.
The lowercase strings are parameter names, they have to be replaced by a proper value. The type of the parameter can be one of the following:
int: an integer value
real: a real value
point: the coordinates of a point (two real values)
str: a text
file: a text containing the specification of a file
group: name of a group
tran: a transformation
obj: single object
sel: selection of a group of objects
set: numerical expression
The type and the function of the parameter are always defined after the description of the command. Parameters from some types can be entered in several ways. For these syntaxes see the chapter Parameter Definitions.
Numeric expressions
The numeric expression can be entered anywhere the program expects a numeric value, length, angle, or coordinate. An expression is a chain of arithmetic operations and operators. The operators and their precedence:
Group 1 ^ or ** power
Group 2 * multiplication
# division
% modulo
Group 3 + addition
- subtraction
Group 4 == equal to
<> or # non-equal to
<= less then or equal to
< less then
>= greater then or equal to
> greater then
Group 5 & logical AND
(operand is TRUE if <> 0
FALSE if = 0;
the result is TRUE, if = 1,
FALSE if = 0;
Group 6 ! logical inclusive OR
Group 7 $ logical exclusive OR
Operators within a group are evaluated from left to right. The order of the evaluation can be changed with parentheses.
Operands can be decimal values, function calls with or without parameters, variable references.
Understanding the return value and content of the functions
The returned value is a key component of functions.
ARCHLine.XP defines a private integer called callReturn and string called callResult for sharing data with other applications.
The int callReturn variable contains the function’s result and send back to the caller.
0 typically means success and negative value means failure.
The std::string callResult contains information about the result of the function.
Example:
GET_DATA IFC ID num
Exports the geometry and parameters of the selected element to an IFC file.
The function returns the IFC file name as a string in the environment variable called "callResult".
Comments
0 comments
Article is closed for comments.