hexagon logo

GETTEXT command

Hello Guys,
i Was wondering if anyone could help me out with a translation

I wrote an auto calibration program which recognizes the probes in the part program and calibrates them.

My only problem is that out company is Hungarian. i use pc-dmis mostly english but my team mates are not.

i want this program to run even on hungarian language settings but i just can't figure out what could be the right string command.

Does anybody has a translation file for these kind of commands ?

with hungarian PC-DMIS software wont recognize these. i think mainly because of the String commands

ASSIGN/TAPINTOKERES1=GETCOMMAND("Load Probe", "DOWN", 4)
ASSIGN/TAPINTO1=GETTEXT("Filename", 0, TAPINTOKERES1)


my code looks like this
KERDES       =COMMENT/YESNO,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO,OVC=NO,
              Szeretné futtatni a kalibráló programot?
              IF/KERDES.INPUT=="YES"
                LOADPROBE/BOSCH-REF
                TIP/TIP1, SHANKIJK=0, 0, 1, ANGLE=0
                AUTOCALIBRATE/PROBE, PARAMETER_SET=ALL-TIPS-WITH-DEFAULTS, QUALTOOL_MOVED=YES_DCC,
                              CHECK COLLISION=YES, SHOW_SUMMARY=YES, OVERWRITE_RESULTSFILE=NO
    BEGIN AUTOCALIBRATE RESULTS FOR PROBE BOSCH-REF USING SET ALL-TIPS-WITH-DEFAULTS
    END AUTOCALIBRATE RESULTS FOR PROBE BOSCH-REF USING SET ALL-TIPS-WITH-DEFAULTS
              END_IF/
              ELSE_IF/KERDES.INPUT<>"YES"
                GOTO/PROGRAMFUTAS
              END_ELSEIF/
              ASSIGN/TAPINTOKERES1=GETCOMMAND("Load Probe", "DOWN", 4)
              ASSIGN/TAPINTO1=GETTEXT("Filename", 0, TAPINTOKERES1)
              LOADPROBE/TAPINTO1
              AUTOCALIBRATE/PROBE, PARAMETER_SET=ALL-TIPS-WITH-DEFAULTS, QUALTOOL_MOVED=NO,
                            CHECK COLLISION=NO, SHOW_SUMMARY=YES, OVERWRITE_RESULTSFILE=NO
  BEGIN AUTOCALIBRATE RESULTS FOR PROBE  USING SET ALL-TIPS-WITH-DEFAULTS
  END AUTOCALIBRATE RESULTS FOR PROBE  USING SET ALL-TIPS-WITH-DEFAULTS
              ASSIGN/TAPINTOKERES2=GETCOMMAND("Load Probe", "DOWN", 4)
              ASSIGN/TAPINTO2=GETTEXT("Filename", 0, TAPINTOKERES2)
              IF/TAPINTO2==""
                GOTO/PROGRAMFUTAS
              END_IF/
              IF/TAPINTO2==TAPINTO1
                GOTO/KOVETKEZO
              END_IF/
              ELSE_IF/TAPINTO2<>TAPINTO1
                LOADPROBE/TAPINTO2
                TIP/, SHANKIJK=0, 0, 1, ANGLE=0
                AUTOCALIBRATE/PROBE, PARAMETER_SET=ALL-TIPS-WITH-DEFAULTS, QUALTOOL_MOVED=NO,
                              CHECK COLLISION=NO, SHOW_SUMMARY=YES, OVERWRITE_RESULTSFILE=NO
    BEGIN AUTOCALIBRATE RESULTS FOR PROBE  USING SET ALL-TIPS-WITH-DEFAULTS
    END AUTOCALIBRATE RESULTS FOR PROBE  USING SET ALL-TIPS-WITH-DEFAULTS
              END_ELSEIF/
              ASSIGN/TAPINTOKERES3=GETCOMMAND("Load Probe", "DOWN", 4)
              ASSIGN/TAPINTO3=GETTEXT("Filename", 0, TAPINTOKERES3)
KOVETKEZO    =LABEL/
              IF/TAPINTO3==TAPINTO2 OR TAPINTO3==TAPINTO1
                GOTO/PROGRAMFUTAS
              END_IF/
              ELSE_IF/TAPINTO3<>TAPINTO2 OR TAPINTO3<>TAPINTO1
                LOADPROBE/TAPINTO3
                AUTOCALIBRATE/PROBE, PARAMETER_SET=ALL-TIPS-WITH-DEFAULTS, QUALTOOL_MOVED=NO,
                              CHECK COLLISION=NO, SHOW_SUMMARY=YES, OVERWRITE_RESULTSFILE=NO
    BEGIN AUTOCALIBRATE RESULTS FOR PROBE  USING SET ALL-TIPS-WITH-DEFAULTS
    END AUTOCALIBRATE RESULTS FOR PROBE  USING SET ALL-TIPS-WITH-DEFAULTS
              END_ELSEIF/
  • I don't understand. If the text you are concerned about is the name of the probe file, that does not get translated, so your GETTEXT function should still work. What am I missing?
  • You have to use the number of the function instead of its name...
  • I believe that he's talking about the text in getcommand ...
  • Ah yes, I get it now, that is correct
  • Don Ruggieri : I'm not at the cmm, can you share the right codes, please ?
  • Hello Guys again, so i figured out some pretty fun stuff.

    so i had two issued which didnt let the program run.

    1st. as JEFMAN said first was the GETCOMM part. Since pc-dmis is funny and the command in hungarian language for Load Probe is way different than the command you write in to load a probe. (TAPINTÓBETÖLTÉS) is the command but for the getcomm part i had to use (TAPINTÓ BETÖLTÉSE) so there is an extra letter. BUT for universal solution i used a command id (61)
    !!FOR ANYONE WHO DOES NOT KNOW THIS TRICK !! if you right click on the edit windows you select a drop down menu called " change pop-up display" and go to the last option which will show you the Id of any command and the command name in your language which is set for PC-DMIS.

    2nd issue was the GETTEXT("Filename" ) i tried many thing in hungarian but finally i found a solution in my older .bas files where it loads a probe and there is a line for it you have to use...(see in red)

    Set DmisCommand = DmisCommands.Add(GET_PROBE_DATA, TRUE)
    DmisCommand.Marked = TRUE
    ' Set Fájlnév = BOSCH-REF
    retval = DmisCommand.PutText ("BOSCH-REF", FILE_NAME, 0)
    Result = DmisCommand.SetExpression("TAPINTO1", FILE_NAME, 0)

    So i share you the final verson of the program which will recognize the probes in the measurement routine and after a YES /NO question it will calbirate the probes if you choose yes.

    ALSO if a probe is duplicated in the program it wont calibrate it twice.

    AUTO_KALIBRALAS=GROUP/SHOWALLPARAMS=YES
    KERDES       =COMMENT/YESNO,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO,OVC=NO,
                  Szeretné futtatni a kalibráló programot?
                  IF/KERDES.INPUT=="IGEN"
                    LOADPROBE/BOSCH-REF
                    TIP/TIP1, SHANKIJK=0, 0, 1, ANGLE=0
                    AUTOCALIBRATE/PROBE, PARAMETER_SET=ALL-TIPS-WITH-DEFAULTS, QUALTOOL_MOVED=YES_DCC,
                                  CHECK COLLISION=YES, SHOW_SUMMARY=YES, OVERWRITE_RESULTSFILE=NO
        BEGIN AUTOCALIBRATE RESULTS FOR PROBE BOSCH-REF USING SET ALL-TIPS-WITH-DEFAULTS
        END AUTOCALIBRATE RESULTS FOR PROBE BOSCH-REF USING SET ALL-TIPS-WITH-DEFAULTS
                  END_IF/
                  ELSE_IF/KERDES.INPUT<>"IGEN"
                    GOTO/PROGRAMFUTAS
                  END_ELSEIF/
                  ASSIGN/TAPINTOKERES1=GETCOMMAND("61", "DOWN", 4)
                  ASSIGN/TAPINTO1=GETTEXT("Fájlnév", 0, TAPINTOKERES1)
                  LOADPROBE/TAPINTO1
                  AUTOCALIBRATE/PROBE, PARAMETER_SET=ALL-TIPS-WITH-DEFAULTS, QUALTOOL_MOVED=NO,
                                CHECK COLLISION=NO, SHOW_SUMMARY=YES, OVERWRITE_RESULTSFILE=NO
      BEGIN AUTOCALIBRATE RESULTS FOR PROBE  USING SET ALL-TIPS-WITH-DEFAULTS
      END AUTOCALIBRATE RESULTS FOR PROBE  USING SET ALL-TIPS-WITH-DEFAULTS
                  ASSIGN/TAPINTOKERES2=GETCOMMAND("61", "DOWN", 4)
                  ASSIGN/TAPINTO2=GETTEXT("Fájlnév", 0, TAPINTOKERES2)
                  IF/TAPINTO2==""
                    GOTO/PROGRAMFUTAS
                  END_IF/
                  IF/TAPINTO2==TAPINTO1
                    GOTO/KOVETKEZO
                  END_IF/
                  ELSE_IF/TAPINTO2<>TAPINTO1
                    LOADPROBE/TAPINTO2
                    AUTOCALIBRATE/PROBE, PARAMETER_SET=ALL-TIPS-WITH-DEFAULTS, QUALTOOL_MOVED=NO,
                                  CHECK COLLISION=NO, SHOW_SUMMARY=YES, OVERWRITE_RESULTSFILE=NO
        BEGIN AUTOCALIBRATE RESULTS FOR PROBE  USING SET ALL-TIPS-WITH-DEFAULTS
        END AUTOCALIBRATE RESULTS FOR PROBE  USING SET ALL-TIPS-WITH-DEFAULTS
                  END_ELSEIF/
                  ASSIGN/TAPINTOKERES3=GETCOMMAND("61", "DOWN", 4)
                  ASSIGN/TAPINTO3=GETTEXT("Fájlnév", 0, TAPINTOKERES3)
    KOVETKEZO    =LABEL/
                  IF/1
                    GOTO/PROGRAMFUTAS
                  END_IF/
                  ELSE_IF/TAPINTO3<>TAPINTO2 OR TAPINTO3<>TAPINTO1
                    LOADPROBE/TAPINTO3
                    AUTOCALIBRATE/PROBE, PARAMETER_SET=ALL-TIPS-WITH-DEFAULTS, QUALTOOL_MOVED=NO,
                                  CHECK COLLISION=NO, SHOW_SUMMARY=YES, OVERWRITE_RESULTSFILE=NO
        BEGIN AUTOCALIBRATE RESULTS FOR PROBE  USING SET ALL-TIPS-WITH-DEFAULTS
        END AUTOCALIBRATE RESULTS FOR PROBE  USING SET ALL-TIPS-WITH-DEFAULTS
                  END_ELSEIF/
    PROGRAMFUTAS  =LABEL/
                ENDGROUP/ID=AUTO_KALIBRALAS
    

  • Don Ruggieri : I'm not at the cmm, can you share the right codes, please ?


    I shared it for you
  • Using the command id is the best way as it will work regardless of language setting.
  • ASSIGN/V1=GETCOMMAND(61,"TOP",1)
    ASSIGN/V2=GETTEXT(152,0,V1)


    V2 gives the name of the loaded probe...