RobotStudio event

SDK Error Constants [WebWare SDK]

Is there a list of constants for the error numbers, eg, -3113 is a "Directory does not exist". I can get the error string, but just looking at a list of constants so I do not re-create them.


  • Hi,

    can you please explain your problem again, I don't fully understand what you want to accomplish?

    If you want them manually then you have them in the [Installation and Setup Guide] chapter 4.

    If you programmatically have the number but want the description then you can use the Helper.ErrorMessage(errorcode) function

    Here is a short example:

    intRetVal = Helper1.S4ProgramVariableRead(Text2.Text, 0, myArray)

    If intRetVal <> 0 Then

    Label1.Caption = Helper1.ErrorMessage(intRetVal)

    Exit Sub

    End If

    It would also be possible to do something like this:

    Label1.Caption = Helper1.ErrorMessage(Helper1.S4ProgramVariableRead(Text2.Tex t, 0, myArray))

  • That's what I am doing. What I am looking for are constants for the actual error codes. What I am forced to do at present is to create a  constant for each error# (rather than use "-3113" atl the time). Example...

    Const SDK_ERR_DIR_NOT_EXIST = -3113

    sdk_status = ilinkRobotHelper.S4Dir(ilinkRobotHelper.DevList(0), edtDeviceDir.Text, SDK_UNIMPLEMENTED_ARG, 3, lResultID)
    If ( SDK_ERR_DIR_NOT_EXIST = sdk_status) Then

        msgbox( ilinkRobotHelper.ErrorMessage(sdk_status) )

    end if



  • Ok, now I'm following. image

    I don't think there is such a list of error number constants. Sorry.