
! script name: filing.d/readcutters

!A
!A NAME:
!A
!A 	Read Cutter Geometry File
!A
!A DESCRIPTION:
!A
!A 	This script allows a file to be read in as a group and makes the
!A 	geometry invisible.  There is a name associated with the group for
!A 	reference.
!A

stat=ChangeLabelStr("ScriptNameStatus","Function: read cutter geometry file ")

DIM Answer$[256]
DIM Destination$[256]
DIM Name$[256]
DIM Group_name$[256]
DIM Dir$[256]

Stat= NamedVarStr("toolimages dir",WsSystemVars,"/usr/weber/util/tooldata/toolimages/",Dir$)

Name$=FileNameString(Dir$,"millcutter")
Group_name$= "mill cutter"
Group=ReadGroupFile(Group_name$,Group_type,Name$)
stat= MakeInvisible(Group)
Vgroup=CreateVariable("milling cutter",20001,Group)

Name$=FileNameString(Dir$,"odlathetool")
Group_name$= "lathe tool"
Group=ReadGroupFile(Group_name$,Group_type,Name$)
stat= MakeInvisible(Group)
Vgroup=CreateVariable("lathe tool",20001,Group)

Name$=FileNameString(Dir$,"idlathetool")
Group_name$= "id lathe tool"
Group=ReadGroupFile(Group_name$,Group_type,Name$)
stat= MakeInvisible(Group)
Vgroup=CreateVariable("id lathe tool",20001,Group)



Leave:!
Stat=SetInputFormat("n4","")

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


