
! script name: turbopost.d/setrpmspeed
! TOPIC: set rpm speed change on an element.

!A
!A NAME:
!A
!A 	Set rpm speed change on an element. Will cause turbopost to
!A	output S word on that element or on the next element with the
!A	capability of outputting an S word.
!A
!A DESCRIPTION:
!A	
!A 	
!A
!B INSTRUCTIONS:
!B
!B
!B

stat=ChangeLabelStr("ScriptNameStatus","Function: set rpm speed")

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


ActivateUndo
Rpm_speed=0.0

Start:!
stat= SetInputFormat("n4=","")
stat= SetEqualsValue(Rpm_speed)
Rpm_speed= GetValue("RPM SPEED ",Answer$)
IF (ExitScript(Destination$)) THEN Leave

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 rpm speed")
Stat= AddItemToUndo(WsUBModifyMode,E1)

stat= SetRpmSpeed(E1,Rpm_speed)

GOTO Pick_ent



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