Reverse generation of RoboDK runnable Python programs?可打印版本 +- RoboDK Forum (//www.sinclairbody.com/forum) +-- Forum: RoboDK (EN) (//www.sinclairbody.com/forum/Forum-RoboDK-EN) +--- Forum: RoboDK API (//www.sinclairbody.com/forum/Forum-RoboDK-API) +--- Thread: Reverse generation of RoboDK runnable Python programs? (/Thread-Reverse-generation-of-RoboDK-runnable-Python-programs) |
Reverse generation of RoboDK runnable Python programs?-TaigoVan-05-03-2021 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 范 RE: Reverse generation of RoboDK runnable Python programs?-Jeremy-05-03-2021 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 RE: Reverse generation of RoboDK runnable Python programs?-Albert-05-03-2021 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 RE: Reverse generation of RoboDK runnable Python programs?-TaigoVan-05-03-2021 (05-03-2021, 06:40 PM)Albert Wrote:Hi Van, Ahhh, that's exactly what I was looking for, thank you very much! |