
! script name: contours.d/splicetypes
! topic: splice types

!A
!A NAME:
!A
!A 	Splice Types
!A
!A DESCRIPTION:
!A
!A 	This script allows two types to be spliced together.  This script
!A 	should be used in conjunction with the OPEN TYPE ENDS script.
!A
!B INSTRUCTIONS:
!B
!B 	PICK FRONT TYPE: Pick an element on one of the types to be spliced
!B 		together.
!B
!B 	PICK NEXT TYPE: Pick an element on the other type to be spliced
!B 		together.
!B
!B NOTES:
!B
!B 	The two types to be spliced together should have a common end point/
!B 	start point, in other words, the end point of the front type should
!B 	be the start point of the next type.
!B

stat=ChangeLabelStr("ScriptNameStatus","Function: splice types ")

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


DeActivateUndo
E1=PickTypeEnt("PICK FRONT TYPE ")
IF (ExitScript(Destination$)) THEN Leave

E2=PickTypeEnt("PICK NEXT TYPE ")
IF (ExitScript(Destination$)) THEN Leave

Stat=SpliceTypes(E1,E2)

Last=FindLastType
IF NOT ValidGeometry(Last) THEN
        Contour=TypesContour(E1,1)
END IF

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