
! script name: points.d/lathepoint
! topic: point defined using lathe coordinates

!A
!A NAME:
!A
!A 	Lathe Input
!A
!A DESCRIPTION:
!A
!A 	This script allows a point to be defined using lathe coordinates,
!A 	Z's and Diameters.
!A
!A~ image location - images/latheinput.jpg
!B INSTRUCTIONS:
!B
!B 	INPUT ABS Z: Enter the Z coordinate of the point (X coordinate
!B 		on mill).
!B
!B 	INPUT ABS DIA: Enter the diameter to be used in determining the
!B 		point location, (twice the Y coordinate on mill).
!B

stat=ChangeLabelStr("ScriptNameStatus","Function: lathe point ")

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


DEG

ActivateUndo
Stat=SetInputFormat("n4","")
Stat=SetXyzInput(WsLatheInput)

Ploop:Pt=XyzInput("INPUT",WsXyOnly)
IF (ExitScript(Destination$)) THEN Leave

Stat=SetLastPoint(Pt,WsXyzInput)

ActivateUndo
Stat= AdvanceUndoNumber("point")
Stat= AddItemToUndo(WsUBCreateMode,Pt)
GOTO Ploop

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