
! script name: contours.d/contendpt
! topic: highlight end point of contour

!A
!A NAME:
!A
!A 	Contour End Point
!A
!A DESCRIPTION:
!A
!A 	This script will highlight the end point of a contour.
!A
!B INSTRUCTIONS:
!B
!B 	PICK AN ELEMENT OF CONTOUR/TYPES: Pick an element on the
!B 		contour to have its end point highlighted.
!B 		

stat=ChangeLabelStr("ScriptNameStatus","Function: contendpt ")

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


ActivateUndo
Pick_loop:!
E1=PickEntity("PICK AN ELEMENT OF CONTOUR/TYPES")
IF (ExitScript(Destination$)) THEN Leave

Stat=Highlight(E1,WsPickPen,WsDirArrowOff)

Pt=ContEndPt(E1)

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

GOTO Pick_loop

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