method Element.CenterOnLane (Horizontal as Boolean)
Centers the element on its lane.

TypeDescription
Horizontal as Boolean A Boolean expression that specifies whether the element is centered on horizontal (True) or vertical (False) lanes.
The CenterOnLane property aligns the element relative to its lane. The X, Y properties of the Element specifies the position of the Element relative to surface. The LaneID property indicates the identifier of the lane from the element. The intersection of the lane with the element determines the lane of the element. Use the LaneByID property to access the lane object giving its identifier. Use the MoveTo method to move/resize the element to a new position / size.

The element or selection's context menu provides a Center-Lane item that allows to the user to center the elements at runtime: