
! script name: draftedit.d/angleplaces
! topic: edit angular decimal places in a dimension

!A
!A NAME:
!A
!A 	CHANGE ANGULAR DECIMAL PLACES
!A
!A DESCRIPTION:
!A
!A	This script changes the angular decimal places in a dimension.
!A
!B INSTRUCTIONS:
!B
!B 	PICK DIMENSION TO BE CHANGED: Pick one of the dimension lines.
!B 
!B 	ANGULAR DECIMAL PLACES AFTER: Input the new decimal places.
!B

stat=ChangeLabelStr("ScriptNameStatus","Function: angular decimal places ")

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

ActivateUndo
Nocalc=0
Calculate=1

Places= GetDefault(WsAPlacesAfter)

Places:stat= SetInputFormat("n0=","")
stat= SetEqualsValue(Places)
Places= GetValue("ANGULAR DECIMAL PLACES AFTER ")
IF (ExitScript(Destination$)) THEN Leave


Element_loop:!
stat= SetInputFormat("a1",",N,")
E1=PickEntity("PICK DIMENSION TO BE CHANGED, New places ",Answer$)
IF (ExitScript(Destination$)) THEN Leave
IF Answer$="N" THEN Places
IF NOT ValidGeometry(E1) THEN Element_loop
E2= ParentDimEnt(E1)
IF NOT ValidGeometry(E2) THEN Element_loop

ActivateUndo
Stat= AdvanceUndoNumber("angle places")
Stat= AddDimToUndo(WsUBModifyMode,E2)

Stat=EditDraftSetting(E2,WsAPlacesAfter,Places,Calculate)

GOTO Element_loop

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