
! script name: draftedit.d/arrowstyle
! topic: edit arrowhead style in a dimension

!A
!A NAME:
!A
!A 	CHANGE ARROWHEAD STYLE
!A
!A DESCRIPTION:
!A
!A 	This script changes the arrowhead style in a dimension.
!A
!B INSTRUCTIONS:
!B
!B 	PICK DIMENSION TO BE CHANGED: Pick one of the dimension lines.
!B
!B 	ARROWHEAD STYLE: Input the new style number.
!B

stat=ChangeLabelStr("ScriptNameStatus","Function: arrowhead style ")

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

ActivateUndo
Nocalc=0
Calculate=1

Style= GetDefault(WsArrowStyle)

Style:stat= SetInputFormat("n0=","")
stat= SetEqualsValue(Style)
Style= GetValue("ARROWHEAD STYLE ")
IF (ExitScript(Destination$)) THEN Leave


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

ActivateUndo
Stat= AdvanceUndoNumber("arrow style")
Stat= AddDimToUndo(WsUBModifyMode,E2)

Stat=EditDraftSetting(E2,WsArrowStyle,Style,Calculate)

GOTO Element_loop

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