Syntax (Variant 1):
#~[Identifier]~,[Output Text];%Comment%
[Identifier]:
This is the name of a fixed text where the output text for the BOM output is stored. If any of the output rows contain the [identifier], the identifier will always be replaced by the corresponding output text. The name is entirely user-definable.
[Output text]:
Character string (unlimited length).
Syntax (Variant 2):
#~[Identifier]~,[Question Text],_..._;%Comment%
[Question text]:
The [question text] is used at runtime to have the user enter a value which is stored under the name [identifier].
_..._:
The number of underscores ('_') determines how many characters of the users answer to the question text are stored. Entries that are longer will be truncated.
Syntax (Variant 3):
#r,[Separate Page Identifier];
Variants 1 through 3 above can be used to output character strings (using their identifier) in a BOM. Variant 3 only refers to the identifier for the separate page for non-grouped data. This identifier can be called up under the name #r. If you have groupings, and all these groupings have been processed, the separate page identifier can also be called up using #g. You can define as many command lines as required for this processing group.
Example (Variants 1, 2 and 3):
#~Text~,This text is too long to be written several times;
#~Processor~,Processed by,_____________________;
#r,separate page;
Explanation of the Example:
At runtime, the user is asked for his/her name by the question Processed by?. The colon (:) is appended automatically.
Syntax (Variant 4):
#~[Identifier]~%([Format])%=%#%[Operand][Mathematical Operation]%#%[Operand];%Comment%
[Identifier]:
The result of the mathematical operation can be called up by specifying this [identifier].
[Format]:
Output format of the result; you can omit this value (see also the topic Formatting). The format determines the maximum length of the character string that can be output.
[Operand]:
If the operand is preceded by a '#', it can be a whole number, and identifies the field of the data record that contains the operand for the mathematical operation. It can also be an identifier preceded and succeeded by the character ~. If the operand is not preceded by the character '#', it can also be a number containing a decimal point (e.g. "3.14") and can have as many numbers before and after the decimal point as required. The decimal point should always be a . If it is written as a comma (,), as is the case in many languages other than English, this will mean your calculations will be incorrect, but you will not be informed of this.
[Mathematical operation]:
The four main mathematical operations are available (plus='+', minus='-', multiplied by='*', divided by ='/').
This syntax enables you to define mathematical operation for each individual data record. You can define as many mathematical operations as you require. They will be applied in the same sequence as they appear in the processing group. The mathematical operations are reapplied for each data record, and are based only on the data record in question. You can also use definitions like this to calculate formulas.
Example (Variant 4):
#~Gross price~(4.2)=#13*1.15
#~Total_price_per_data_record~(8.2)=#~Gross price~*#2;
#~Total weight~(.6)=#12*#2;
Explanation of the Example:
It is assumed that the values in fields 2 (Quantity), 12 (Mass) and 13 (Price) are valid and correct. If the fields do not contain any values or numbers, the value of the field is set to zero, and this can result in incorrect results of the calculations. The results of the calculations are supplied in the format specified.
Syntax (Variant 5):
$~[Total Type][Identifier]~%([Format])%=%#%[Operand]%[Mathematical Operation]%#%[Operand]%;%Comment%
[Total Type]:
The following are valid character strings for the total type:
total |
Total for the entire BOM |
group |
Total for a group in the BOM |
page |
Total for a page of the BOM |
Any character strings can be appended to the above strings so that the total can be printed out. A total is a cumulative value that increases data record by data record. At the beginning of the BOM, all "total[Identifiers]" are set to zero. At the beginning of a group, all "group[Identifiers]" are set to zero. At the beginning of a page, all "page[Identifiers]" are set to zero.
This means that it is possible to calculate column totals per page, group, or for the entire BOM. If you specify a mathematical operation, this operation is applied first, and then the result of the calculation is totaled up.
Example 1:
$~page_quantity~=#2;
$~group_quantity~=#2;
$~total_quantity~=#2;
Explanation of the Example:
Totals are calculated using field 2 (Quantity).
Example 2:
$~page_mass~(10.6)=#2*#12;
$~total_mass~(10.6)=#2*#12;
Explanation of the Example:
To ensure that the mass totals are calculated correctly, the individual masses (field 12) of the data record must first be multiplied by the quantity (field 2) of parts. The resulting value is the mass of all parts of the data record. This value is cumulative.
Example 3: (same result as Example 2)
#~Total weight~(.6)=#12*#2;
$~page_mass~(10.6)=#~Total weight~;
$~total_mass~(10.6)=#~Total weight~;
It is also possible to import variables from the configuration settings. If you wish to do this, define a variable and place the character @ in front of it.
Example: @~created_by ~, "GEN@User@UserName.
This variable will be used during printout, and the value read from the GENIUS.CFG file. If the variable is not found, an empty character string is output.
Output rows /start, /header, /line, /filler, /footer, /end
Output rows do not end with a semicolon ;. These rows are read and output row by row. If a line feed was not defined by means of a printer control character (see topic entitled "Printer File"), and this character is called up in the row, you cannot generate a line feed. This is necessary because the printer control characters can be different for every printer model, and the printer template should not be subject to these restrictions.
Of course, all characters in the ASCII character set can be used for the output rows. Furthermore, you can print out all user-defined identifiers (for restrictions, please refer to the individual topics), all default identifiers, and all printer control characters. For more information on the output format of the identifiers, please refer to the topic entitled "Print Formats". If identifiers that are not allowed are requested for an output row, a blank space is output instead.
The length of the output row is restricted. If all identifiers and printer control characters are replaced with their values, the output length may not exceed 2048 characters.
The total number of rows in the /header, /line and /footer should not exceed the page length in the printer file.
For an overview of all the commands available for changing templates for BOM evaluation, please refer to Changing Templates for BOM Evaluation.