
! script name: 3dcpaths.d/autoextoff
! 3dtopic: turn off auto edge extension of all surface edges in a part

!A
!A NAME:
!A
!A 	Auto Edge Extension: Part Edges Off
!A
!A DESCRIPTION:
!A
!A 	This script will turn off the auto edge extension of all surface edges
!A 	in a part.
!A
!B INSTRUCTIONS:
!B
!B 	PICK SURFACE GROUP: Pick the group of surfaces.
!B

Stat=ChangeLabelStr("ScriptNameStatus","Function: auto extend off edges")

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


DeActivateUndo
Start:!
Pick_loop:!
Stat=SetPickMask(WsPickSurfOnly)
Stat=SetInputFormat("n4","")
Part_group=PickGroupEnt("PICK SURFACE GROUP",WsSurfaceGroup)
IF ExitScript(Destination$) THEN Leave
IF NOT ValidGeometry(Part_group) THEN Pick_loop

Stat=Highlight(Part_group,WsPickPen,WsDirArrowOff)
Stat=SetPickMask(WsPickGeometry)
Num_surfs=GroupCount(Part_group)
FOR I=1 TO Num_surfs
	Surface=GroupElement(Part_group,I)
	Stat=UnSetEdgeExt(Surface,0)
NEXT I
GOTO Pick_loop

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