
! script name: turbopost.d/rapidmoveoff
! TOPIC: turn on rapid motion off for a single element

!A
!A NAME:
!A
!A 	Rapid Move Off
!A
!A DESCRIPTION:
!A
!A 	Turn on rapid motion off for a single element.
!A 
!B INSTRUCTIONS:
!B
!B
!B

stat=ChangeLabelStr("ScriptNameStatus","Function: rapid motion off")

DIM Destination$[256]
DIM Answer$[256]
DIM Surface_dir$[80]


Feed_linetype= 0

Start:!
ActivateUndo

Pick_ent:!
stat= SetInputFormat("n4","")
E1=PickEntity("PICK ENTITY ",Answer$)
IF (ExitScript(Destination$)) THEN Leave
IF NOT ValidGeometry(E1) THEN Pick_ent

Stat= AdvanceUndoNumber("rapid motion off")
Stat= AddItemToUndo(WsUBModifyMode,E1)

stat= SetRapidFlag(E1,0)
stat= SetLineType(E1,Feed_linetype)

GOTO Pick_ent



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