Compile function NDW_LOG_TEST_WAFER_USAGE_EVENTS(CtrlEntId, Event, @PARAMS) #pragma precomp SRP_PreCompiler #window NDW_LOG_TEST_WAFER_USAGE Declare function Get_Property, Error_Services, Test_Run_Services, Reactor_Services, Tool_Services Declare subroutine Set_Property, Error_Services $Insert LOGICAL $Insert TEST_RUN_EQUATES $Insert RDS_EQUATES GoToEvent Event for CtrlEntId else // Event not implemented end Return EventFlow or 1 //----------------------------------------------------------------------------- // EVENT HANDLERS //----------------------------------------------------------------------------- Event WINDOW.CREATE(CreateParam) GoSub FillFormMasterData debug PresetRDSNo = '' PresetTestType = '' PresetEquipmentType = '' PresetEquipmentId = '' If CreateParam NE '' then RDSNo = CreateParam<1, 1> PresetTestType = CreateParam<1, 2> PresetEquipmentType = CreateParam<1, 3> PresetEquipmentId = CreateParam<1, 4> end If RDSNo NE '' AND RowExists('RDS', RDSNo) then PSN = XLATE('RDS', RDSNo, RDS_PROD_SPEC_ID$, 'X') Set_Property(@Window : '.EDL_RDS', 'TEXT', RDSNo) Set_Property(@Window : '.EDL_PSN', 'TEXT', PSN) Set_Property(@Window : '.EDL_PSN', 'ENABLED', False$) end If PresetTestType NE '' then Begin Case Case PresetTestType EQ 'STANDARD' Set_Property(@Window : '.CMB_TEST_TYPE', 'TEXT', 'Standard Sampling') End Case end If PresetEquipmentType NE '' then Begin Case Case PresetEquipmentType EQ 'Reactor' Set_Property(@Window : '.CMB_EQUIP_TYPE', 'TEXT', 'Reactor') Case PresetEquipmentType EQ 'Non-Reactor' Set_Property(@Window : '.CMB_EQUIP_TYPE', 'TEXT', 'Tool') End Case end If PresetEquipmentId NE '' then SelectedEquipType = Get_Property(@Window : '.CMB_EQUIP_TYPE', 'TEXT') Begin Case Case SelectedEquipType EQ 'Reactor' If RowExists('REACTOR', PresetEquipmentId) then Set_Property(@Window : '.CMB_EQUIPMENT_ID', 'TEXT', PresetEquipmentId) end Case SelectedEquipType EQ 'Non-Reactor' If RowExists('REACTOR', PresetEquipmentId) then Set_Property(@Window : '.CMB_EQUIPMENT_ID', 'TEXT', PresetEquipmentId) end End Case end EventFlow = 1 End Event //----------------------------------------------------------------------------- // Internal GoSubs //----------------------------------------------------------------------------- FillFormMasterData: //Get Test run type options. Populate to CMB_TEST_TYPE TestRunTypeList = Test_Run_Services('GetAllTestRunTypes') Set_Property(@Window, '@RUN_TYPE_OPTS', TestRunTypeList) TestRunTypeOpts = '' for each TestRunID in TestRunTypeList<1> using @VM setting tPos TestRunName = TestRunTypeList<2, tPos> TestRunTypeOpts<-1> = TestRunName Next TestRunID Set_Property(@Window : '.CMB_TEST_TYPE', 'LIST', TestRunTypeOpts) //Get Tool and Reactor Identifiers and buffer them in user defined window properties @REACTOR_OPTS and @NON_REACTOR_OPTS //Reactors ReactorOpts = Reactor_Services('GetReactorNumbers') //Set_Property(@Window : '.EDT_REACTORS', 'TEXT', ReactorOpts) Set_Property(@Window, '@REACTOR_OPTS', ReactorOpts) //Non Reactors NonReactorOpts = Tool_Services('GetAllTools') swap @VM with @FM in NonReactorOpts Set_Property(@Window : '.EDT_NON_REACTORS', 'TEXT', NonReactorOpts) Set_Property(@Window, '@NON_REACTOR_OPTS', NonReactorOpts) //Then set the inital combo list to be filled with reactors because that is the default. Set_Property(@Window : '.CMB_EQUIPMENT_ID', 'LIST', ReactorOpts) //Get TW Products and store them in user defined window property @TW_PROD_OPTS Prods = Test_Run_Services('GetAllTWProdKeys', 1) Set_Property(@Window, '@TW_PROD_OPTS', Prods) Return