
! script name: property.d/plotbyprop
! topic: show entities associated with a given info packet

!A
!A NAME:
!A
!A 	Show Elements Associated with Info Packets.
!A
!A DESCRIPTION:
!A
!A	This script displays the elements that are associated with a given info
!A	packet. Use this to identify which elements are associated to your info 
!A	packets.
!A
!B INSTRUCTIONS:
!B
!B 	INPUT PACKET ID NAME: Select the packet ID Name.
!B
!# see also - htdocs/help.d/property.htm

stat=ChangeLabelStr("ScriptNameStatus","Function: show by info packet ")

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

Start:!
Group= GrpOfUserProps
IF NOT GroupCount(Group) THEN
	Stat= DeleteEntity(Group)
	GOTO Leave
END IF
Stat=UserSelectBox("INFO PACKETS","Packet selected",0,WsPropGroupSelect,Group)

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

Num1= NumericPrefix(Name$)
IF NOT Num1 THEN Pick_prop
Prop_ent= GroupElement(Group,Num1)
IF NOT ValidGeometry(Prop_ent) THEN Start
Id_number= GetUserValue(Prop_ent,"Class id number:")
ClearAll
Stat=PlotAssocEnt(Prop_ent,Id_number)
Stat= DeleteEntity(Group)

GOTO Start

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

