
! script name: property.d/propclasslist
! topic: list the info packet classes present

!A
!A NAME:
!A
!A 	List Class Names
!A
!A DESCRIPTION:
!A
!A 	This script lists all the info packet classes that are present
!A 	within a file. This script will make you aware of every packet
!A 	included in a file, so that you can verify and identify them.
!A
!# see also - htdocs/help.d/items.htm
!# see also - htdocs/help.d/property.htm

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

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

Start:!
File$= "tempdata"
Stat= RemoveFile(File$)

Data$="     PACKET CLASS NAMES    ,,"
Prop_group= GrpOfUserProps
IF NOT ValidGeometry(Prop_group) THEN Leave
Stat= AlphabetizePropGrp(Prop_group)
IF NOT GroupCount(Prop_group) THEN Leave
FOR I=1 TO GroupCount(Prop_group)
	E1= GroupElement(Prop_group,I)
	A$= UserDataStr(E1,"Class name:")
	B$= ","&A$&","
	IF NOT POS(Data$,B$) THEN
		B$= A$&","
		Data$= Data$&B$
	END IF
NEXT I

Stat= ReplaceChar(Data$,",",CHR$(10),Data1$)
Stat= OutputString(File$,Data1$,WsNewFile)
Stat=MessageFileBox(File$,"PACKET CLASS LIST")
Stat= DeleteEntity(Prop_group)


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

