You are currently reviewing an older revision of this page.
This tutorial shows two methods for capturing the origin coordinates of a point feature.
Example 1 - Using an Expression Evaluator
The origin coordinates of a 2D or 3D point feature can be captured at placement as described.
Feature properties include text box properties to hold the X, Y and Z coordinates.
Since coordinate values should not be modified by user input, the property definition is set to Read Only. To extract the coordinates, the placing and editing keys are set as expressionEvaluator and defined value as FeatureName.FeaturesCentroid.X (or Y, or Z) depending on the coordinate.
The PBA for the point feature can be defined as a string or a node using \010 to insert a new line:
XY=[X],[Y] or X=[X]\010Y=[Y]
Example 2 - Using PBA text replacement
In this example, the cell contains two text elements that will be replaced using built-in xCoord and yCoord values for PBA text replacement. This differs from the first example in that it replaces the text in the cells rather than placing coordinate text dynamically.
In the Symbology node of the feature definition, two Replacement Text keys are added. To do this, choose Add > PBA Replacement Text from the right click menu.
Set the Values to xCoord and YCoord respectively. In the Replacement Text Details section, define the Old Text as the text in the cell to be replaced. In this example, that will be [X] and [Y].
A sample schema is attached for learning.