! script name: hexajet.d/preview
! var_topic: preview simulation
! Version_270726.a
!A
!A NAME:
!A
!A      Start Hex-A_Jet Machine Interface
!A
!A DESCRIPTION:
!A
!A      Start the HexaJet interface with the current nc file
!A      for script execution.
!A
!B INSTRUCTIONS:
!B
stat=ChangeLabelStr("ScriptNameStatus","Function: preview")
DIM Header$[4096]
DIM Jobname$[256]
DIM Filename$[256]
DIM File_name$[256]
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Stat= CurrentHeader(Header$)
Head=ReadUserData(WsGeneralString,"HEADER",Header$)
Stat=GetUserString(Head,"File name:",Jobname$)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
File_name$= Jobname$[1,LEN(Jobname$)-4]
Filename$= File_name$&".haj"
Stat=DumpDebug("FILE_NAME = "&Filename$)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Stat=StartProcess("C:/usr/weber/tmp/hexajet.exe -s -f "&Filename$)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Leave:!
Stat=SetInputFormat("n4","")
IF (NOT LEN(Destination$)) THEN
         LOAD "typecontrol"
ELSE
         LOAD Destination$
END IF
END
