
! script name: contours.d/opentypeend
! topic: open type end

!A
!A NAME:
!A
!A 	Open Type End
!A
!A DESCRIPTION:
!A
!A 	This script is designed to allow a type number sequence to be inserted.
!A 	The contour should either be an open contour that have a type number
!A 	sequence added onto the end point of the contour, or a contour that has
!A 	had a type deleted from it and a new type(s) will be added on.
!A
!B INSTRUCTIONS:
!B
!B 	PICK TYPE TO BE OPENED: Pick the element on the type to be added onto.
!B
!B NOTES:
!B
!B 	After a type has been opened, the type number sequence may be continued.
!B 	If the contour is to be closed, the SPLICE TYPES script must be accessed
!B 	to attach the new type(s) to the other section of the contour.  Then,
!B 	the CLOSE CONTOUR script must be accessed.
!B

stat=ChangeLabelStr("ScriptNameStatus","Function: open type end ")

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


DeActivateUndo
E1=PickTypeEnt("PICK TYPE TO BE OPENED")
IF (ExitScript(Destination$)) THEN Leave

Stat=OpenClosedEnd(E1)

Stat=PlotOpenTypes(WsTypesPen)

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