
! script name: edit.d/editmachining
! topic: edit machining data

!A
!A NAME:
!A
!A 	Edit Machining Data
!A
!A DESCRIPTION:
!A
!A 	This script allows the selection of a machining data
!A 	option.  The following are the present choices:
!A
!A 		OFFSETS
!A 		POCKETS
!A
!B INSTRUCTIONS:
!B
!B 	SELECT EDIT FUNCTION: The EDIT MACHINING DATA OPTIONS
!B 		selection box will automatically appear to
!B 		allow the selection of a machining data option.
!B

stat=ChangeLabelStr("ScriptNameStatus","Function: edit machining data ")

DIM Answer$[256]
DIM Name$[256]
DIM Destination$[256]
DIM Title$[256]
DIM Label$[256]
DIM Namelist$[5000]
DIM Post_name$[256]
DIM Dir$[256]
DIM Mask$[256]
DIM Directory$[256]

DEG

DeActivateUndo
Start:!
Directory$= "offsets.d"
Title$="EDIT MACHINING"
Label$="FUNCTION SELECTED"
Namelist$="OFFSETS,"
Namelist$=Namelist$&"POCKETS,"

Stat=GeneralListBox(Title$,Label$,Namelist$)
Stat=SetInputFormat("a99","")
Stat=GetValue("SELECT EDIT FUNCTION",Answer$)
IF (ExitScript(Destination$)) THEN Leave

LowerSelectBox
stat= SetInputFormat("n4","")
Name$=Answer$
SELECT Name$
CASE "OFFSETS"
	LOAD FileNameString(Directory$,"editoffset")
	
CASE "POCKETS"
	LOAD FileNameString(Directory$,"editpocket")

CASE "CANCEL"
	 GOTO Leave
END SELECT

GOTO Start

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