
! script name: milacron.d/listsections
! topic: list the data in the section

!A
!A NAME:
!A
!A 	List Screw Section Data
!A
!A DESCRIPTION:
!A
!A	This script lists the data for a section of the screw.
!A
!# see also - htdocs/help.d/property.htm

stat=ChangeLabelStr("ScriptNameStatus","Function: list screw section data")

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(20000,20100)

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

Stat=SetInputFormat("a99","")
Stat=GetValue("SECTION 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
