
! script name: hexajet.d/endhexajet
! var_topic: end codes for the hexajet

!A
!A NAME:
!A
!A 	End codes for Hexajet		VARIATIONAL
!A
!A DESCRIPTION:
!A
!A
!B INSTRUCTIONS:
!B
!B

stat=ChangeLabelStr("ScriptNameStatus","Function: hexajet end")

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


Var_object= CheckVarObject
IF (ExitScript(Destination$)) THEN Leave


Table_dir$="/usr/weber/database/tables/Hexajet_mm.d"
ActivateUndo

RecordFunctionOn
Stat= RecordDescr("HEXAJET: End")
Stat= SetRecDelLastExec
Pc=PointXYZ(100,0,0)
Table1= ImportTable(Table_dir$&"/Ending_Codes",Pc,WsUpperLeft,CHR$(9))
Stat= NameEntity(Table1,"Hexajet_ending_codes")
Stat= EndHexaJet
Stat=DeleteEntity(Pc)
Stat=DeleteEntity(Table1)
RecordFunctionOff
Curr_record= CurrentVarRecord
CloseVarRecord

ActivateUndo
Stat= AdvanceUndoNumber("hexajet end")
Stat= AddItemToUndo(WsUBCreateMode,Curr_record)


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