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

!A
!A NAME:
!A
!A 	Auto Edge Extension: Part Edges Off  VARIATIONAL
!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 Part_group$[256]

Var_object= CheckVarObject
IF (ExitScript(Destination$)) THEN Leave


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

Stat=Highlight(Part_group,WsPickPen,WsDirArrowOff)
Stat=SetPickMask(WsPickGeometry)

RecordFunctionOn
Stat= RecordDescr("PROPERTY: Turn Auto Edge Ext Off")
Stat= NullReference(Part_group$)
Stat=UnSetEdgeExt(Part_group$,0)
RecordFunctionOff
CloseVarRecord

GOTO Pick_loop

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