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

!A
!A NAME:
!A
!A 	Input XYZ
!A
!A DESCRIPTION:
!A
!A 	This script creates points using the XYZ INPUT MODE as a default.
!A
!A~ image location - images/inputxyz.jpg
!B INSTRUCTIONS:
!B
!B 	INPUT ABS X,Y,Z: Enter the X,Y,Z coordinates of the point.
!B 		NOTE: See XYZ INPUT OPTIONS.
!B
!# see also - points.d/xyzinput.hlp

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

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


DEG

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

Ploop:Pt=XyzInput("INPUT",WsXyzInput)
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
