
! script name: move.d/movetypes
! topic: move types in contour 

!A
!A NAME:
!A
!A 	Move Types
!A
!A DESCRIPTION:
!A
!A 	This script allows types in a contour to be moved as the contour
!A 	is described.  The types moved are automatically attached to the
!A 	last type defined.
!A
!B INSTRUCTIONS:
!B
!B 	PICK STARTING TYPE: Pick an element of the starting type to be moved.
!B
!B 	PICK ENDING TYPE: Pick an element of the ending type to be moved.
!B
!B 	NUMBER OF TIMES MOVE: Enter the number of times the move sequence
!B 	 	should be repeated.
!B

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

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


DeActivateUndo
stat= SetInputFormat("n4","")
Ploop:!

Last_type=FindLastType

IF NOT ValidGeometry(Last_type) THEN Leave

Start_type=PickTypeEnt("PICK STARTING TYPE")
IF (ExitScript(Destination$)) THEN Leave

End_type=PickTypeEnt("PICK ENDING TYPE")
IF (ExitScript(Destination$)) THEN Leave

Stat=SetInputFormat("n0","")
Ntimes=GetValue("NUMBER OF TIMES MOVE",Answer$)
IF (ExitScript(Destination$)) THEN Leave

Angle=0

T1=MoveTypes(Start_type,End_type,Last_type,Ntimes)
PlotAll

Leave:!
stat= SetInputFormat("n4","")
IF (NOT LEN(Destination$)) THEN
	 LOAD "typecontrol"
ELSE
	 LOAD Destination$
END IF
END
