INTERSECTY Function

Returns the y -coordinate (in the local coordinate system) of the point where two lines intersect.

Syntax

INTERSECTX(x1, y1, angle1, x2, y2, angle2 )

Parameters

Name Required/Optional Data Type Description
x1
Required
Number
The x-coordinate of a point on the first line.
y1
Required
Number
The y-coordinate of a point on the first line.
angle1
Required
Number
The value of the Angle cell for the first line.
x2
Required
Number
The x-coordinate of a point on the second line.
y2
Required
Number
The y-coordinate of a point on the second line.
angle2
Required
Number
The value of the Angle cell for the second line.

Return value

Number

Remarks

Each line is defined as a point (x,y) and an angle.

Microsoft Visio uses this function in the PinY cell of a shape glued to a rotated guide.

If the lines don't intersect, the function returns a divide-by-zero error (#DIV/0!), which Visio ignores, restoring the last known value for the point.

Example

INTERSECTY(VertGuide!PinX,VertGuide!PinY,VertGuide!Angle, HorzGuide!PinX,HorzGuide!PinY,HorzGuide!Angle)

Returns the y -coordinate of the intersection point of VertGuide and HorzGuide in page units.