
! script name: contours.d/contstartpt
! topic: highlight start point of contour

!A
!A NAME:
!A
!A 	contstartpt
!A
!A DESCRIPTION:
!A
!A 	This script will highlight the start 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 start point highlighted.
!B

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

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=ContStartPt(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
