Select Case ECU_Typ Case "VW", "AUDI" NNam_Str = "MED9_VW_AUDI,MED9_VW_AUDI_VR6,MED9_VW_AUDI_V8_V10,MED9_VW_AUDI_R4TSI" FlgNamChk = Check_Nestor_Name(Nestor_Name, Nestor_Vari, NNam_Str) If FlgNamChk = "0" Then SW_PRO = Nestor_Name SW_PST = Nestor_Vari Print #6, "002," + ECU_Typ + "," + Nestor_Name + "," + Nestor_Vari Else SelMet = "02" NewKomb = GetCMLabelFunc(SelMet, Nestor_Name, Nestor_Vari) SW_PRO = element(0, "|", NewKomb) SW_PST = element(1, "|", NewKomb) End If Print #4, "002,003," + Nestor_Name + "," + Nestor_Vari + "," + SW_PRO + "," + SW_PST 'Print #7, "002,003," + Nestor_Name + "," + Nestor_Vari + "," + SW_PRO + "," + SW_PST Case "BMW" NNam_Str = "ME922_BMW,MED922,MEV92,MED921,ME92C" FlgNamChk = Check_Nestor_Name(Nestor_Name, Nestor_Vari, NNam_Str) If FlgNamChk = "0" Then SW_PRO = Nestor_Name SW_PST = Nestor_Vari Print #6, "002," + ECU_Typ + "," + Nestor_Name + "," + Nestor_Vari Else SelMet = "02" NewKomb = GetCMLabelFunc(SelMet, Nestor_Name, Nestor_Vari) SW_PRO = element(0, "|", NewKomb) SW_PST = element(1, "|", NewKomb) End If Print #4, "002,011," + Nestor_Name + "," + Nestor_Vari + "," + SW_PRO + "," + SW_PST 'Print #7, "002,011," + Nestor_Name + "," + Nestor_Vari + "," + SW_PRO + "," + SW_PST Case "DAIMLER-CHRYSLER", "AMG" NNam_Str = "ME97,MED97" FlgNamChk = Check_Nestor_Name(Nestor_Name, Nestor_Vari, NNam_Str) If FlgNamChk = "0" Then SW_PRO = Nestor_Name SW_PST = Nestor_Vari Print #6, "002," + ECU_Typ + "," + Nestor_Name + "," + Nestor_Vari Else SelMet = "02" NewKomb = GetCMLabelFunc(SelMet, Nestor_Name, Nestor_Vari) SW_PRO = element(0, "|", NewKomb) SW_PST = element(1, "|", NewKomb) End If Print #4, "002,001," + Nestor_Name + "," + Nestor_Vari + "," + SW_PRO + "," + SW_PST 'Print #7, "002,001," + Nestor_Name + "," + Nestor_Vari + "," + SW_PRO + "," + SW_PST Case "VOLVO", "FORD" NNam_Str = "ME90" FlgNamChk = Check_Nestor_Name(Nestor_Name, Nestor_Vari, NNam_Str) If FlgNamChk = "0" Then SW_PRO = Nestor_Name SW_PST = Nestor_Vari Print #6, "002," + ECU_Typ + "," + Nestor_Name + "," + Nestor_Vari Else SelMet = "03" NewKomb = GetCMLabelFunc(SelMet, Nestor_Name, Nestor_Vari) SW_PRO = element(0, "|", NewKomb) SW_PST = element(1, "|", NewKomb) End If Print #4, "002,019," + Nestor_Name + "," + Nestor_Vari + "," + SW_PRO + "," + SW_PST 'Print #7, "002,019," + Nestor_Name + "," + Nestor_Vari + "," + SW_PRO + "," + SW_PST Case "GM" NNam_Str = "MED961,GM_SAAB_HOLDEN_ME96" FlgNamChk = Check_Nestor_Name(Nestor_Name, Nestor_Vari, NNam_Str) If FlgNamChk = "0" Then SW_PRO = Nestor_Name SW_PST = Nestor_Vari Print #6, "002," + ECU_Typ + "," + Nestor_Name + "," + Nestor_Vari Else SelMet = "01" NewKomb = GetCMLabelFunc(SelMet, Nestor_Name, Nestor_Vari) SW_PRO = element(0, "|", NewKomb) SW_PST = element(1, "|", NewKomb) End If Print #4, "002,021," + Nestor_Name + "," + Nestor_Vari + "," + SW_PRO + "," + SW_PST 'Print #7, "002,021," + Nestor_Name + "," + Nestor_Vari + "," + SW_PRO + "," + SW_PST Case Else Print #6, "002," + ECU_Typ + "," + Nestor_Name + "," + Nestor_Vari End Select Static Function GetCMLabelFunc(SelMet, Nestor_Name, Nestor_Vari) Select Case SelMet Case "01" GetCMLabelFunc = GetCMLabelMet_01(Nestor_Name, Nestor_Vari) Case "02" GetCMLabelFunc = GetCMLabelMet_02(Nestor_Name, Nestor_Vari) Case "03" GetCMLabelFunc = GetCMLabelMet_03(Nestor_Name, Nestor_Vari) Case Else in1 = MsgBox("Methode = " + SelMet + " unknown!") End Select End Function Static Function GetCMLabelMet_01(Nestor_Name, Nestor_Vari) If element(1, "_", Nestor_Vari) = "_" Then SW_PRO = Nestor_Name SW_PST = Nestor_Vari Else If element(2, "_", Nestor_Vari) = "_" Then SW_PRO = element(0, "_", Nestor_Vari) SW_PST = Mid(Nestor_Vari, InStr(1, Nestor_Vari, "_") + 1) Else SW_PRO1 = element(0, "_", Nestor_Vari) SW_PRO2 = element(1, "_", Nestor_Vari) SW_PRO = SW_PRO1 + "_" + SW_PRO2 SW_PST = Mid(Nestor_Vari, Len(SW_PRO) + 2) End If End If GetCMLabelMet_01 = SW_PRO + "|" + SW_PST End Function Static Function GetCMLabelMet_02(Nestor_Name, Nestor_Vari) If element(1, "_", Nestor_Vari) = "_" Then SW_PRO = Nestor_Name SW_PST = Nestor_Vari Else SW_PRO = element(0, "_", Nestor_Vari) SW_PST = Mid(Nestor_Vari, InStr(1, Nestor_Vari, "_") + 1) End If GetCMLabelMet_02 = SW_PRO + "|" + SW_PST End Function Static Function GetCMLabelMet_03(Nestor_Name, Nestor_Vari) SW_PRO = Mid(Nestor_Vari, 1, 4) SW_PST = Mid(Nestor_Vari, 5) GetCMLabelMet_03 = SW_PRO + "|" + SW_PST End Function