Syntax
- string getTreeKey()
Returns
The unique TreeKey of the shape being derived, formatted as a string list. The TreeKey is a list of integer numbers denoting the path from the root shape to the shape being derived in the shape tree. Each number denotes the 0-based child index, see example 1 below.
Note:
The TreeKey stays the same during derivation of the whole rule, see example 1 below.
Examples
Simple example
CGA code
CGA console output
| Model Hierarchy |
The TreeKey stays the same during derivation of the whole rule
CGA code
ShapeA -->
print(getTreeKey)
split(x){ 2: ShapeB print(getTreeKey)
| 3: ShapeC print(getTreeKey) }
CGA console output
0;
0;
0;