
! script name: contours.d/unlinktypes
! topic: unlink types

!A
!A NAME:
!A
!A 	Unlink Types
!A
!A DESCRIPTION:
!A
!A 	This script allows a contour that was created by Type numbers to
!A 	be unlinked.  This means that the type number association will be
!A 	destroyed but the geometry will remain intact (lines and arcs).
!A 	Note, this will also unlink any other group that is associated
!A 	with this type.
!A
!B INSTRUCTIONS:
!B
!B 	PICK A TYPE: Pick a type on the contour to be unlinked.
!B

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

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


DeActivateUndo
Ploop:!
E1=PickTypeEnt("PICK A TYPE")
IF (ExitScript(Destination$)) THEN Leave

Stat=HighlightTypes(E1,WsTypesPen,WsDirArrowOff)
Stat=UnLinkTypes(E1)

GOTO Ploop

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