RobotStudio event

How to get the RobotStudio Error Code from EventLogDomain in PC SDK?

vikram6892
edited December 2018 in Developer Tools
I would like to get the Error code "50050" from Robotstudio and perform some operations in RAPID via PC SDK.
From the EventLogMessage class, I can access only limited information about the message.
The number and sequence number properties are not unique to process.
How can I get the error code ?
Thanks in advance.


Best Answer

Answers

  • Hi, im nearly on the same problem. What informationen you get out with the EventLogMessage class?
  • Hello,
    I've used RobotStudio.API.Internal.EventLogMessage
    With that, you can get .Msg.Domain and .Msg.Number.

    You can found an example here:





    ☑️2024 - RobotStudio® User Group

  • Hello @DenisFR,
    I have problem using the assembly that you shared. From the message number, I could see the last two digits map to the Error Code from Robotstudio.
    Please correct me if I am wrong,

    Hello peterj,
    Here is the information from the EventLogMessage for an error in Singularity


    I would like to have your inputs as well if this is correct.
    Thanks in advance.

  • vikram6892
    edited December 2018
    Hello @DenisFR
    I did not have any problem in compiling my application.
    I just wanted to extract the error code and do some operations in my application based on the error code.
    I got the answer from you.
    Thanks a lot.
  • Msg.Number is not the same as error code, Can anyone tell me how to get the error code such as "50050"
  • I got, the error code is  error type * 10000 + number