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

Reverse generation of RoboDK runnable Python programs?

#1
Hello, 

A question about the Python API that I didn't find in the guide.

I know it is possible to create Python programs and program them in an editor and finally execute them on RoboDK. So does RoboDK have the ability to reverse this process? Is it possible to reverse generate a Python program and run it on RoboDK?

For example, if I build a program using the command function in the RoboDK toolbar, can I convert it into a Python program where the code is copied directly to another newly created Python program and then run the same process on RoboDK.  The function "Generate robot programm"  can only display code based on the current robot language in the editor.

I'm looking forward to your feedback.

Thx

Van
#2
In theory, that's possible.
That's one of the main functions of RoboDK in fact, generating robot code based on the program you create using the UI.
Creating code for a specific robot controller or creating Python, there's not much difference. At the end of the day, it's just a text file.

But for that to work, RoboDK needs a post-processor.
And we don't have one for Python (as far as I know).

It's always possible for you to create a post-processor if you need to.
But what are you trying to achieve exactly?

Jeremy
Find useful information about RoboDK and its features by visiting our Online Documentation and by watching tutorials on our Youtube Channel


#3
Hi Van,

Yes, we have this option in RoboDK. You should use this post processor:
Quine

This will create Python code that can recreate the original program.

Albert
#4
(05-03-2021, 06:40 PM)Albert Wrote: Hi Van,

Yes, we have this option in RoboDK. You should use this post processor:
Quine

This will create Python code that can recreate the original program.

Albert

Ahhh, that's exactly what I was looking for, thank you very much!
  




Users browsing this thread:
1 Guest(s)