
! script name: points.d/pointxy
! topic: create point using XY input mode as default

!A
!A NAME:
!A
!A 	Input XY
!A
!A DESCRIPTION:
!A
!A 	This script creates points using the XY INPUT MODE as a default.
!A
!A~ image location - images/inputxy.gif
!A
!B INSTRUCTIONS:
!B
!B 	INPUT ABS X,Y: Enter the X,Y coordinates of the point.
!B 		NOTE: See XYZ INPUT OPTIONS.
!B
!# see also - points.d/xyzinput.hlp
!# Tutorial: Conventions: htdocs/tutorial.d/conventions.htm
!# Tutorial: This is a Startup: htdocs/tutorial.d/ConversationalMill.d/holes.htm

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

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


DEG

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

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
