
! script name: lines.d/verticalline
! topic: construct line parallel to Y axis through point

!A
!A NAME:
!A
!A 	Vertical Line
!A
!A DESCRIPTION:
!A
!A 	This script constructs a line parallel to the Y axis through a point.
!A
!B INSTRUCTIONS:
!B
!B 	INPUT ABS X,Y,Z: Enter the X,Y,Z coordinates of the point, through
!B 		which the parallel line will be constructed.
!B 		NOTE: See XYZ INPUT OPTIONS.
!B
!# see also - points.d/xyzinput.hlp

stat=ChangeLabelStr("ScriptNameStatus","Function: vertical line ")

DIM Answer$[256]
DIM Destination$[256]

DEG

ActivateUndo
Line_loop: !
Stat=SetInputFormat("n4","")
Pc=XyzInput("INPUT",WsXyzInput)
IF (ExitScript(Destination$)) THEN Leave
IF NOT ValidGeometry(Pc) THEN Line_loop

Angle=90

L1=PointAngle(Pc,Angle)

Stat=SetLastPoint(Pc)
Stat=DeleteEntity(Pc)

ActivateUndo
Stat= AdvanceUndoNumber("line")
Stat= AddItemToUndo(WsUBCreateMode,L1)

GOTO Line_loop

Leave:!
Stat=DeleteEntity(Pc)
IF (NOT LEN(Destination$)) THEN
	 LOAD "typecontrol"
ELSE
	 LOAD Destination$
END IF
END
