
! script name: property.d/listpropgrp
! topic: list the members of info packet group

!A
!A NAME:
!A
!A 	List Property Group
!A
!A DESCRIPTION:
!A
!A 	This script lists the names of info packets in a specified group.
!A 	This script will show every info packet that is contained in a
!A 	specific group.  Use this function to help with packet maintenance
!A 	and to narrow packet queries.
!A
!# see also - htdocs/help.d/property.htm

stat=ChangeLabelStr("ScriptNameStatus","Function: list info packet group ")

DIM Destination$[256]
DIM Answer$[256]
DIM Name$[256]
DIM A$[256]
DIM B$[256]
DIM List$[32000]
DIM File$[256]
DIM File2$[256]

Start:!
Stat=ListGrpNames("PACKET GROUPS","selected group","",WsGrpOfProperties)
IF Stat=1 THEN Leave
Stat=SetInputFormat("a99","")
Stat=GetValue("PACKET GROUP NAME",Answer$)
IF (ExitScript(Destination$)) THEN Leave
IF Answer$="CANCEL" THEN Leave
Prop_group=FindNamedGrp(Answer$)
IF NOT ValidGeometry(Prop_group) THEN Start
Stat=SetInputFormat("n4","")
LowerSelectBox

Group_name$= EntityNameStr(Prop_group)
IF GroupCount(Prop_group) THEN
List$=""
FOR I=1 TO GroupCount(Prop_group)
        E1= GroupElement(Prop_group,I)
        A$= UserDataStr(E1,"Class name:")
        B$= UserDataStr(E1,"Name:")
        List$= List$&VAL$(I)&")  "&A$&":  "&B$&CHR$(10)
NEXT I
stat= OutputString("tempdata",List$,WsNewFile)
Stat=MessageFileBox("tempdata",Group_name$)
END IF

GOTO Start

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

