XCoordinates, YCoordinates Properties

Measurement Studio User Interface

XCoordinates, YCoordinates Properties

Syntax

CWShape.XCoordinates

CWShape.YCoordinates

Data Type

Variant

Purpose

Specifies the X and Y coordinates of the shape.

Remarks

Assign arrays of values to the XCoordinates and YCoordinates properties to specify the coordinates of the shape.

For cwShapePoint, cwShapeLine, cwShapePolygon, and cwShapeRegion, the pairs of X and Y coordinates are used as vertices.

For cwShapeRectangle, cwShapeOval, and cwShapeImage, the first two pairs of X and Y coordinates are used as corner vertices.

For cwShapeArc, the first X and Y coordinates are used as the center of the rotation of the arc. The second X and Y coordinates are used as the major and minor axes lengths. If specified, the third X coordinate is used as the rotation, in degrees, of the arc. If specified, the fourth X and Y coordinates are used as the starting and ending angles of the arc.

For cwMinMaxRegion, the first X coordinate, if specified, is used as an X minimum. If specified, the first Y coordinate is used as a Y minimum. If specified, the second X coordinate is used as an X maximum. If specified, the second Y coordinate is used as a Y maximum.

Example

Dim shape As CWShape
...
'Specify a triangle
shape.Type = cwShapePolygon
shape.XCoordinates = Array(1, 2, 3)
shape.YCoordinates = Array(1, 2, 1)
'Specify a rectangle from (1,1) to (2,2)
shape.Type = cwShapeRectangle
shape.XCoordinates = Array(1, 2)
shape.YCoordinates = Array(1, 2)
'Specify a quarter turn arc of radius 3 centered at (1,1)
shape.Type = cwShapeArc
shape.XCoordinates = Array(1, 3, 0, 0)
shape.YCoordinates = Array(1, 3, 0, 90)
'Specify the region x > 5
shape.Type = cwShapeMinMaxRegion
shape.XCoordinates = Array(5)
shape.YCoordinates = Array()

See Also

CWShape.Type