
! script name: vcontrol.d/unsetnopathsw
! var_topic: unset no path switch on a variational record

!A
!A NAME:
!A
!A      UNSET NO PATH SWITCH ON A VARIATIONAL RECORD
!A
!A DESCRIPTION:
!A
!A 	This script will unset the flag which prevents entities from being
!A 	in a contour.	
!A
!B INSTRUCTIONS:
!B	
!B	PICK VARIATIONAL RECORD: Pick the record to unset the no path switch.
!B
!# see also - htdocs/help.d/vdminfo.htm

stat=ChangeLabelStr("ScriptNameStatus","Function: unset no path switch")

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

DeActivateUndo
Highlight_color=4

Start:!
Pick_record:!
stat= SetInputFormat("n4","")
E1=PickEntity("PICK VARIATIONAL RECORD")
IF ExitScript(Destination$) THEN Leave
IF NOT ValidGeometry(E1) THEN Pick_record

Var_record= VarRecordParent(E1)
IF NOT ValidGeometry(Var_record) THEN Pick_record

Stat= SetNoPathFlag(Var_record,0)
Stat= Highlight(Var_record,Highlight_color,0)

GOTO Pick_record

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