
! script name: colors.d/highlightname
! topic: highlight named group

!A
!A NAME:
!A
!A 	Group Highlight
!A
!A DESCRIPTION:
!A
!A 	This script allows a group that has a name associated with it to be
!A 	highlighted.
!A
!B INSTRUCTIONS:
!B
!B 	INPUT LIST NAME: The selection box with the available list of named
!B 		groups will automatically appear for a selection to be made.
!B

stat=ChangeLabelStr("ScriptNameStatus","Function: highlight named group ")

DIM Destination$[256]
DIM Answer$[256]
DIM Name$[256]
DIM Listdata$[3000]

Start:!

Stat=ListGrpNames("GROUP NAMES","selected contour","")
IF Stat=1 THEN Leave

Stat=SetInputFormat("a99","")
Stat=GetValue("INPUT LIST NAME",Answer$)
IF (ExitScript(Destination$)) THEN Leave
IF Answer$="CANCEL" THEN Leave
Name$=Answer$

Group=FindNamedGrp(Name$)

IF (NOT ValidGeometry(Group)) THEN Start

Stat=Highlight(Group,WsHighlightPen,WsDirArrowOn)

GOTO Start


Leave:!

LowerSelectBox

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