EXECUTE ​
Executes a text as GraphRep code or draw an available internal symbol.
Syntax ​
EXECUTE ( strValue | internal:modifier )
[ x:measureValue ] [ y:measureValue ] [ w:measureValue ] [ h:measureValue ]
Parameters ​
<main-parameter>
(strValue, optional) - The GraphRep code to execute.internal
(modifier, optional) - The name of the internal symbol to draw.x
(measureValue, optional) - The x-coordinate used for the GraphRep. The default is0cm
.y
(measureValue, optional) - The y-coordinate used for the GraphRep. The default is0cm
.w
(measureValue, optional) - The width used for the GraphRep. The default is0cm
.h
(measureValue, optional) - The height used for the GraphRep. The default is0cm
.
Details ​
This command is not influenced by any style commands.
If a string is passed as <main-parameter>
, this string is interpreted as GraphRep code and the resulting symbol is drawn at the position specified with x
and y
. If the symbol is sizeable, the size of the drawn symbol can be set with w
and h
.
The value for the main parameter must be an entire and valid GraphRep code, meaning that it has to start with the GRAPHREP
command. Since it is provided as a string value it is necessary to escape certain characters, like "
as \"
. It can be provided dynamically, like generating it based on attribute values. However, the impact on performance in such a case is unknown. The code is also interpreted in a separate scope, so it does not have access to the same variables as the code where EXECUTE
is used.
Alternatively an internal symbol can be drawn by specifying its name via the internal
parameter. The following symbols are available:
Name | Example | Notes |
---|---|---|
warn01 | The top-left corner of the symbol is located at the specified position and its size controlled through w and h . |
See Also ​
Examples ​
Draw the internal warn01
symbol with a size of 1cm times 1cm.
GRAPHREP
EXECUTE internal:warn01 w:1cm h:1cm
Draw several squares and rhombi inside each other. Uses EXECUTE
to repeat the basic shape of a rhombus inside a square.
GRAPHREP
SHADOW off
# Set up reusable GraphRep code.
SET symbol:("GRAPHREP sizing:asymmetrical
PEN w:0.1cm color:\"$888844\"
FILL color:\"$bbbb77\"
RECTANGLE w:1cm h:1cm
FILL color:\"$eeeeaa\"
POLYGON ({0.5cm, 0cm, 1cm, 0.5cm, 0.5cm, 1cm, 0cm, 0.5cm})")
# Draw the above GraphRep code three times with different sizes and positions.
EXECUTE (symbol) x:0cm y:0cm w:2cm h:2cm
EXECUTE (symbol) x:0.5cm y:0.5cm w:1cm h:1cm
EXECUTE (symbol) x:0.75cm y:0.75cm w:0.5cm h:0.5cm
Versions and Changes ​
Available since ADOxx 1.3