
! script name: property.d/listproperty
! topic: list the data in an info packet

!A
!A NAME:
!A
!A 	List Property
!A
!A DESCRIPTION:
!A
!A 	This script lists the data in a selected info packet.  Info packets
!A 	are listed by class name followed by the packet name.
!A
!A 		FOR EXAMPLE:
!A 		Class name: Packet name
!A
!A 	The list will then give the ASCII data contained in the packet.
!A
!# see also - htdocs/help.d/property.htm

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

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

Start:!

Group= GrpOfUserProps

Pick_prop:!
IF NOT GroupCount(Group) THEN Leave
Stat=UserSelectBox("INFO PACKETS","Packet selected",0,WsPropGroupSelect,Group)

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

Num1= NumericPrefix(Name$)
IF NOT Num1 THEN Pick_prop
Element= GroupElement(Group,Num1)
IF NOT ValidGeometry(Element) THEN Start
File$="tempdata"
Ent_name$= EntityNameStr(Element)
Stat=OutputUserData(Element,File$,WsNewFile)
Stat=MessageFileBox(File$,Name$&" : "&Ent_name$)
GOTO Pick_prop

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