{
    "header": {
        "version": 1,
        "type": "record"
    },
    "body": {
        "record1": {
            "<1>": "declare function fieldcount, msg\r\n$insert msg_equates\r\n$insert logical\r\n\r\nRecipePromptCnt = get_property( @window, '@RecipePromptCnt' )\r\nRecipeControls = get_property( @window, '@RecipeControls' )\r\nRecipeDataOnWindow = get_property( RecipeControls, 'INVALUE' )\r\nconvert @rm to @vm in RecipeDataOnWindow\r\nif RecipeDataOnWindow = str( @vm, RecipePromptCnt-1 ) then\r\n    MsgInfo = ''\r\n    MsgInfo<mtext$> = 'You cannot have a blank multi layer recipe...'\r\n    MsgInfo<micon$> = 'H'\r\n    Void = msg( '', MsgInfo )\r\n    return 0\r\nend else\r\n\tCurLayerNo = get_property( @window, '@CurLayer' )\r\n\tAllLayers  = get_property( @window, '@RecipeInfo' )\r\n\tAllLayers = fieldstore( AllLayers, char(248), CurLayerNo, 1, RecipeDataOnWindow )\r\n\tVoid = set_property( @window, '@RecipeInfo', AllLayers )\r\n\tCurLayerNo += 1\r\n\tVoid = set_property( @window, '@CurLayer', CurLayerNo )\r\n\t* now display the next recipe layer\r\n\tNextLayerData = field( AllLayers, char(248), CurLayerNo )\r\n\t*\r\n\tValueCnt = fieldcount( NextLayerData, @vm )\r\n\t* so set_property does not propagate\r\n\tif ValueCnt < RecipePromptCnt then\r\n\t   NextLayerData := str( @vm, RecipePromptCnt-ValueCnt-1 )\r\n\tend\r\n\t* ok\r\n\tNewLayer = false$\r\n\tif NextLayerData = str( @vm, RecipePromptCnt-1 ) then\r\n\t   NewLayer = true$\r\n\tend\r\n\tconvert @vm to @rm in NextLayerData\r\n\tVoid = set_property( RecipeControls, 'INVALUE', NextLayerData )\r\n\tNumLayers = fieldcount( AllLayers, char(248) ) + NewLayer\r\n    .layer_desc->text = CurLayerNo:' of ':NumLayers\r\n    void = set_property( @window:'.EPI_DOPANT', 'FOCUS', 1 )    \r\nend\r\nRETURN 0"
        }
    }
}