
! script name: 3dcpaths.d/setrapidmove
! TOPIC: turn on rapid motion on a single element.

!A
!A NAME:
!A
!A 	Set Rapid
!A
!A DESCRIPTION:
!A	
!A 	Turn off rapid motion on a single element.
!A 	

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

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


Rapid_linetype= 8

Start:!

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

ActivateUndo
Stat= AdvanceUndoNumber("set rapid move")
Stat= AddItemToUndo(WsUBModifyMode,E1)

stat= SetRapidFlag(E1,1)
stat= SetLineType(E1,Rapid_linetype)

GOTO Pick_ent



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