
! script name: trim.d/untrim
! topic: untrim an element

!A
!A NAME:
!A
!A 	Extend
!A
!A DESCRIPTION:
!A
!A 	This script allows an element to be untrimmed.  A line is extended
!A 	if it is untrimmed.  An arc will become a complete circle if it is
!A 	untrimmed.
!A
!B INSTRUCTIONS:
!B
!B 	PICK ELEMENT TO BE UNTRIMMED: Pick the element that should be untrimmed.
!B

stat=ChangeLabelStr("ScriptNameStatus","Function: untrim element ")

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

DEG

ActivateUndo

Ploop:!
E1=PickEntity("PICK ELEMENT TO BE UNTRIMMED")
IF (ExitScript(Destination$)) THEN Leave

ActivateUndo
Stat= AdvanceUndoNumber("untrim")
Stat= AddItemToUndo(WsUBModifyMode,E1)

Stat=UnTrimEntity(E1)

GOTO Ploop

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