
! script name: circles.d/orientcircle
! topic: orients the circle starting angle

!A
!A NAME:
!A
!A 	Orient Circle
!A
!A DESCRIPTION:
!A
!A 	This script orients a circles starting angle.
!A
!B INSTRUCTIONS:
!B
!B	PICK CIRCLE: Pick the circle to orient.
!B
!B	ANGLE: Enter the angle or pick a line to describe it.
!B

stat=ChangeLabelStr("ScriptNameStatus","Function: orient circle ")

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

ActivateUndo
Pick_circle:Stat=SetInputFormat("n4","")
E1=PickEntity("PICK CIRCLE")
IF ExitScript(Destination$) THEN Leave

Angle_ques:Angle=InputAngle("ANGLE")
IF ExitScript(Destination$) THEN Leave

ActivateUndo
Stat= AdvanceUndoNumber("orient circle")
Stat= AddItemToUndo(WsUBModifyMode,E1)

Stat= OrientCircle(E1,Angle)

Stat= PlotEntity(E1)
GOTO Pick_circle

Leave:!
IF NOT LEN(Destination$) THEN
	LOAD "typecontrol"
ELSE
	LOAD Destination$
END IF
END

