
! script name: turbopost.d/vsetrapidmove
! var_topic: set rapid motion on a single element.

!A
!A NAME:
!A
!A 	Set Rapid	VARIATIONAL
!A
!A DESCRIPTION:
!A	
!A 	Set rapid motion a single element.
!A

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

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

Rapid_linetype= 8
Var_object= CheckVarObject
IF (ExitScript(Destination$)) THEN Leave

Start:!
ActivateUndo

Pick_ent:!
stat= SetInputFormat("n4","")
E1=PickEntity("PICK ENTITY ")
IF (ExitScript(Destination$)) THEN Leave
IF NOT ValidDependency(E1) THEN Pick_ent
Stat=EntityNameCheck(E1,Name1$)

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

Descr$= "MACHINING: Set Rapid Motion "
RecordFunctionOn
Stat=RecordDescr(Descr$)
Stat= SetRapidFlag(Name1$,1)
stat= SetLineType(Name1$,Rapid_linetype)
RecordFunctionOff
Curr_record= CurrentVarRecord
CloseVarRecord

Stat= AddItemToUndo(WsUBCreateMode,Curr_record)
GOTO Pick_ent



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