Advanced Text Capabilities (Basics)

www.CAD6.com

In all texts and dimensions in Malz++Kassner CAD6 you can use various advanced functions that go beyond normal character strings. This allows you to influence both the content and the display of the texts - partly dynamic, partly static.

 

The following options are available:

 

 

1. Formatting

Using Text Formatting you can control the appearance of text. For example, font and color within a text can be changed using control sequences similar to HTML.

 

The text:

The <b>quick</b> brown fox <u>jumps</u> over the <i><b>lazy</b> dog</i>

 

leads to the following display:

 

 

2. Attributes

Attributes are snippets of text that can be associated with objects and blocks. An attribute has a name and content in text form. An attribute can be accessed within text by enclosing the name of the attribute in the ~ character.

 

The text:

Preis: ~Price~ Euro

 

leads to the following display if the text is in a block that contains the attribute "Price" with the value "29.95":

Preis: 29,95 Euro

 

Attributes can be output via parts lists in databases or CSV files.

 

Besides user-defined attributes, there are some implicit attributes that are always available (e.g. ~*00~ for "name of block this object resides in"). You can also search for attributes in order to insert them into texts.

 

 

3. Variables

Variables are also snippets of text, but they are defined globally for the current drawing. A variable has a name and content in text form. A variable can be accessed within text by enclosing the variable name in the ~ character.

 

The text:

<File Version: ~Version~

 

leads to the following display if the "Version" variable contains the value "6.2.0":

File Version: 6.2.0

 

In addition to user-defined variables, there are some global drawing variables that are always available (e.g. ~%z0~ for "current drawing's filename"). In addition, the contents of databases can be accessed as variables in order to insert them into texts.

 

Whether or not variables will be resolved can be chosen separately for each drawing in the Manage > Drawing Settings > Screen options dialog.

 

 

4. Statements

Using Statements, numerical and text values can be linked and formatted. A statement must always be enclosed in curly brackets { } .

 

The text:

{.(12+3)/2}

 

leads to the following display:

7.5

 

The text:

{f,3 ~Data~/3}

 

leads to the following display if the "Data" variable contains the value "2":

0,667

 

In statements, you can use texts, numbers, Mathematical Terms, Attributes, Variables, and constants.

 

Whether or not statements in texts shall be executed can be chosen separately for each drawing in the Manage > Drawing Settings > Screen options dialog.

 

 

5. Mathematical Terms

With Mathematical Terms, numerical values can be arithmetically linked to new results. The numerical values can be numbers, Attributes, Variables, and constants.

 

The term:

(8+2)*4

 

leads to the result:

40

 

The term:

(~var1~+~var2~)/2

 

determines the mean of the two values var1 and var2 (which are either variables or attributes).

 

Within texts, mathematical expressions are only evaluated within statements in curly brackets { }!

 

CAD6studio Release 2024.1 - Copyright 2024 Malz++Kassner® GmbH