
! script name: propoerty.d/listentprops
! topic: list all info packets associated with an entity

!A
!A NAME:
!A
!A 	List Entity Info Packets
!A
!A DESCRIPTION:
!A
!A 	List all the info packets associated with an entity.
!A
!B INSTRUCTIONS:
!B
!B 	PICK ENTITY: This script will list the info packets associated
!B 	with the selected entity.
!B
!# see also - htdocs/help.d/property.htm

stat=ChangeLabelStr("ScriptNameStatus","Function: list entity info packets ")

DIM Destination$[256]
DIM Answer$[256]
DIM Name$[256]
DIM Class$[256]
DIM A$[256]
DIM B$[256]
DIM File$[256]

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


Pick_entity:!
Stat= SetInputFormat("n4","")
E1=PickEntity("PICK ENTITY")
IF ExitScript(Destination$) THEN Leave


Group= EntUserPropGrp(E1)
IF NOT ValidGeometry(Group) THEN Leave
Nitems= GroupCount(Group)
IF Nitems= 0 THEN Leave

stat= OutputString(File$,CHR$(10),WsNewFile)
FOR Item= 1 TO Nitems
	Element= GroupElement(Group,Item)
	Name$= UserDataStr(Element,"Name:")
	Class$= UserDataStr(Element,"Class name:")
	A$= Class$&" : "&Name$&CHR$(10)
	stat= OutputString(File$,A$,WsAppend)
NEXT Item
stat= OutputString(File$,CHR$(10),WsAppend)
Stat=MessageFileBox(File$,"INFO PACKET LIST")
Stat= DeleteEntity(Group)

GOTO Start

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

