Remote operator dialog box can't send answer

TompanhuhuTompanhuhu Sweden
edited October 2018 in Developer Tools

I’m trying to create a remote operator dialog with my PC app but can’t get the SendAnswer() method to work.

I have followed this guide:

I have managed to catch the event, create a operator dialog and display header & messages. But I can’t return answer to robotcontroller.

I have tried the following code both on a virtual and a real controller.

I don’t get any error messages when trying the send the answer, nothing just happens.

If I answer the operator dialog on the robotcontroller my dialog is closed in the PC app so abort message is working fine.

Tpwrite & Tperase also works fine, and everything with uimsgbox works except sendanswer.


First I have created a subscription on the event.

//subscribing to event
robcontroller.Rapid.UIInstruction.UIInstructionEvent += new UIInstructionEventHandler(OnUIInstructionEvent); 

This is my eventhandler.

void OnUIInstructionEvent(object sender, ABB.Robotics.Controllers.RapidDomain.UIInstructionEventArgs e) {
            //Check what eventType is coming in
if (e.InstructionEventType == UIInstructionEventType.Post)
   if (e.InstructionType == UIInstructionType.TPWrite)     {
                    //Put latest tpwrite message on main screen
Form3.Instance.labelTpwrite.Text = e.EventMessage;
//Creat a listviewitem to add message to log listview
ListViewItem _temp = new ListViewItem(e.TaskName);
//Add item to top of listview
if (e.InstructionType == UIInstructionType.TPErase)   
//Clear listview 
            else if (e.InstructionEventType == UIInstructionEventType.Send) {
//If new op dialog is created, change image to alert operator message is avalible.     
Form3.Instance.pDialog.Image = Properties.Resources.dialog_new;
if (e.InstructionType == UIInstructionType.UIMessageBox)   {
//If messagetype is uimsgbox create new dialog window
uimsgbox Newbox = new uimsgbox(e);
else if (e.InstructionType == UIInstructionType.UIAlphaEntry) {
//If messagetype is AlphaEntry create new dialog window      var aen = e as UIAlphaEntryEventArgs;
uialpha newal = new uialpha(aen);

else if (e.InstructionEventType == UIInstructionEventType.Abort) {
//Abort dialog in the current task if there is any
foreach (TabPage _tab in opDialog.Instance.tabControl1.TabPages)     {
if (_tab.Name == e.TaskName) {                
//If there is no avalible dialog reset dialog image.
if (opDialog.Instance.tabControl1.TabPages.Count == 0) Form3.Instance.pDialog.Image = Properties.Resources.dialog1;

This is my operator window object:


public partial class uimsgbox : UserControl
UIMessageBoxEventArgs eventobj;
public uimsgbox(UIInstructionEventArgs _e) {
this.Dock = DockStyle.Fill;
//Add data from event object to local UIMessageBoxEventArgs object
eventobj = _e as UIMessageBoxEventArgs;
//I have also tried to instantly send answer when creating object but it dosen't work either
//Fill dialog with header & message lines.
labelHeader.Text = eventobj.Header;
labelmsgline1.Text = eventobj.MsgArray[0].ToString();
labelmsgline2.Text = eventobj.MsgArray[1].ToString();
labelmsgline3.Text = eventobj.MsgArray[2].ToString();
labelmsgline4.Text = eventobj.MsgArray[3].ToString();
labelmsgline5.Text = eventobj.MsgArray[4].ToString();
//Create a new tabpage and add this control to page
TabPage _page = new TabPage(eventobj.TaskName);
_page.Name = eventobj.TaskName;
         private void button1_Click(object sender, EventArgs e){
         private void button2_Click(object sender, EventArgs e){

         private void button3_Click(object sender, EventArgs e){


         private void button4_Click(object sender, EventArgs e){
         private void button5_Click(object sender, EventArgs e){



         private void button6_Click(object sender, EventArgs e){
         private void button7_Click(object sender, EventArgs e){


I have created 7 buttons because I have tried every message available to return but none of them works.


Rapid code for messagebox:

UIMsgBox\Header:="This is a header","my simple message";


Image of operator dialog in PC app.

Can anyone tell me what I have done wrong?

I have tried everything I can think of.


Robotware: 6.07

PC SDK: 6.07

PC: Windows 10 pro

Best Answer


Sign In or Register to comment.