« Back

Name too long

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Name too long
community graphrep documentation
Answer
3/27/14 12:14 PM
In case a name of an element is too long, it is not displayed nicely. How can we force the text to split into several lines?

RE: Name too long
aval attr line-break rigorous as-original-type
Answer
11/27/13 9:22 AM as a reply to Natalia Sudakova.
The ATTR command is used for displaying the value of an attribute in the graphical representation (GraphRep). The parameter w is used for setting the width of the text and the horizontal alignment (left, right or centered) in relation to the text's given position (x, y). The parameter line-break is used for configuring the automatic line breaking function. The default value is words, which implies breaking the line before the first word that goes beyond the maximum length; if the value is rigorous, the word is broken before the first letter that goes beyond the permitted width and the value off disables the line-break function.

The maximum width can be a predefined value, as in the example below

1ATTR "Name" x:0cm y:0cm w:c: ( 3.5cm ) line-break:rigorous

or can be set by the end-user; in this case, an attribute of type DOUBLE has to be defined, displayed in the attribute representation and read in the graphical representation using the AVAL command:

1AVAL set-default:3.5 line_length:"Line length" as-original-type
2ATTR "Name" x:-2cm y:1cm w:c: ( CM(line_length) ) line-break:rigorous