
! script name: colors.d/colorconccir
! topic: assign color to all circles concentric to a given circle.

!A
!A NAME:
!A
!A 	Color Concentric Circles
!A
!A DESCRIPTION:
!A	
!A	This script will color all circles which are concentric to
!A	a given circle. The circles may be in a different z plane
!A	from the given circle.
!A
!A
!B INSTRUCTIONS:
!B
!B	PICK CIRCLE:	Pick the circle that determines the center.
!B
!B OPTIONS:
!B
!B

stat=ChangeLabelStr("ScriptNameStatus","Function: color concentric circles ")

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

ActivateUndo
Pen_color= CurrentColor
RaiseColorBox

Planar= WsFalse
Min_angle= 0.0

Pick_circle:!

E1=PickSpecificEnt("PICK CIRCLE ",WsPickCircles)
IF (ExitScript(Destination$)) THEN Leave
Etype= EntityType(E1)
IF Etype<>WsCircleEnt THEN Pick_circle

G1= GrpConcCircles(E1,WsFalse,Planar,Min_angle)

ActivateUndo
Stat= AdvanceUndoNumber("color conc circles")
Stat= AddGroupToUndo(WsUBModifyMode,G1,0,WsFalse)

Stat=SetColor(G1)
Stat= DeleteEntity(G1)

GOTO Pick_circle

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