INTERSECTX function

Microsoft Office ShapeSheet

INTERSECTX function

See also

Returns the x-coordinate (in the local coordinate system) of the point where two lines intersect. Each line is defined as a point (x,y) and an angle.

Syntax

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

x1

The x-coordinate of a point on the first line.

y1

The y-coordinate of a point on the first line.

angle1

The value of the Angle cell for the first line.

x2

The x-coordinate of a point on the second line.

y2

The y-coordinate of a point on the second line.

angle2

The value of the Angle cell for the second line.

Remarks

Microsoft Visio uses this function in the PinX 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

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

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