Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

How to add Instruction "Show Message Instruction" via Python API?

#1
Hello everyone,

i want to create a comment in a Programm.

Via RoboDK GUI it is add Instruction "Show Message Instruction".
What is the equivalent to that as a python function?

The closest I have found is "INS_TYPE_PRINT" to find such an instruction

i hope you can help me.

best regards
jonas
#2
Hi, you can try the runInstruction() function.
something like programItem.RunInstruction("Comment you want to add", INSTRUCTION_COMMENT) should work.
Hope that helps :)
#3
this is a good answer,
but unfortunately not exactly the answer I am looking for.


I also have the same problem with "Simulation Event Instruction". With "INS_TYPE_EVENT" I can find it, but I can't add a new one.
#4
You can add a message to a RoboDK Program using RunMessage:
https://robodk.com/doc/en/PythonAPI/robo...RunMessage

You can find examples of event instruction in the forum, i.e.:
https://robodk.com/forum/Thread-Attach-a...TYPE_EVENT
Please read the Forum Guidelines before posting!
Find useful information about RoboDK by visiting our Online Documentation.
#5
Hey, I don't know if this is what you are searching for, but what at least I do if I want to show a window with a message on it is by only adding:

RDK.ShowMessage("Message you want to show")

I always put a condition before so if something happens then the Message appears.

Hope that solves your problem
  




Users browsing this thread:
1 Guest(s)