RobotStudio event

Text in ComboBox

Hello,

I need to put text from rapid variable (string) to list of members in Combo box. How can I do that? When I connect item with controller variable I get only text from appearance not from string variable.

 

Thank you for support. BR Jiri.

Answers

  • Hi Jiri,

    Is the rapid defined as an array?

     

    MODULE MainModule
     PERS string stringVar{5}:=["uno","dos","tres","cuatro","cinco"];
     PROC main()
      <SMT>
     ENDPROC
    ENDMODULE

     

    BR/Carlos

     

     

    Carlos Martinez
    ABB
  • Hello, no, when it´s defined as array, then everything is ok and I can see text defined in variable. But when It´s  only one PERS string...... than I can see only text field defined in combo box settings.

     

    BR Jiri. 

  • Hi Jiri,

     

    I am not sure if I am understanding your real need. Can you put a sample RAPID code?

     

    The ComboBox allows you to list values, either by binding the collection of the ComboBox to a RAPID array, or by adding one item at a time (fixed values or individual RAPID data). In both cases, the value of the RAPID data (single or the array) will be presented in the UI.

     

    BR/Carlos

    Carlos Martinez
    ABB
  • Hello, as you can see, when I add variable to combo box via add/remove items, I get only default text in combo box list.

    1.jpg 309K
    2.jpg 345.4K
    3.jpg 350.4K
    4.jpg 358.4K
  • Hi Jiri,

     

    I was able to reproduce this bug. I also report this to our support team.

    Thanks for your explanation. My guess is that you will need a workaround in the short term while this is fixed (either put them in an array, or do some extra coding in C#)

     

    Thanks again for your feedback

     

    BR/Carlos

    Carlos Martinez
    ABB
  • Hello, I use array but I must change many things in rapid code.

    Thank you for support.