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

!A
!A NAME:
!A
!A      Set Exclude from Path
!A
!A DESCRIPTION:
!A
!A	This script sets the exclude from path switch for a record.
!A
!B INSTRUCTIONS:
!B
!B	PICK VARIATIONAL RECORD: Pick the record to exclude from paths.
!B
!C NOTES:
!C
!C	Entities created by this record cannot be used in a contour.
!C	Use this when an entity is not to be in one of the objects
!C	contours.
!C
!# see also - htdocs/help.d/vdminfo.htm

Stat=ChangeLabelStr("ScriptNameStatus","Function: set no path switch")

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

DeActivateUndo
Highlight_color=2

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,1)
Stat= Highlight(Var_record,Highlight_color,0)

GOTO Pick_record

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