
! script name: tools.d/toollist
! topic: Sample - read tool file and display information

!A
!A NAME:
!A
!A 	toollist
!A
!A DESCRIPTION:
!A
!A 	This script reads a tool data file and displays the entire list of
!A 	information.
!A
!B INSTRUCTIONS:
!B
!B 	NO HELP AVAILABLE AT THIS TIME
!B
!C NOTE:
!C
!C 	This is an unsupported sample script.
!C

stat=ChangeLabelStr("ScriptNameStatus","Function: toollist ")

DIM Destination$[256]
DIM Answer$[256]
DIM Name$[256]
DIM File$[256]

File$="/usr/weber/userdata/toollist"

Material=FindUserData("MATERIAL",WsMaterial)

Stat=OutputUserData(Material,File$,WsNewFile)

Stat=OutputAllData(File$,WsToolData,WsAppend)

Stat=MessageFileBox(File$,"TOOL LIST")

Leave:!
IF (NOT LEN(Destination$)) THEN
	 LOAD "typecontrol"
ELSE
	 LOAD Destination$
END IF
END
