« Back

Dynamic PEN Width in GRAPHREP

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Dynamic PEN Width in GRAPHREP
community graphrep documentation
Answer
1/9/19 1:51 PM
Some students discovered that in the GRAPHREP of relations under ADOxx 1.3 it does not seem possible to dynamically change the width of lines.
This is illustrated in the following code: when changing the value of variable "wi" there is no effect on the graphical representation, although the PEN statement should influence the width of the following line.

1START
2SET wi:5cm
3PEN color:black w: ((wi))
4LINE x1:0.1cm y1:0.5cm x2:1cm y2:2cm


Are we doing this right way? (we also tried to use an eval expression instead but it did not help either)

RE: Dynamic PEN Width in GRAPHREP
Answer
6/21/13 4:48 AM as a reply to Anonymous.
Currently ADOxx expects a concrete numeric value by the specification of the PEN element, setting these dynamically is not possible. A dynamic view can be implemented using IF ELSE statements and set the PEN for each case.

From the specification of GRAPHREP syntax the following applies

1PEN [ style: PenStyle ] [ w: width ] ...

In this case a width value is expected.

1RECTANGLE [ x: xposExpr ] [ y: yposExpr ] [ w: widthExpr ] [ h: heightExpr ]

In this case a width expression is expected.

We will further investigate this issue and analyse if a change of the behaviour is feasible for the next platform release.