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

Generate a robot program through python API

#1
Hello everyone, 

I am automating the creation of programs for a RoboDK simulation through the provided python API.

I am now stuck on the part on how to generate a robot program (Without having to right click on the program + generate robot program) directly from the python API. If such a solution exists, how can we choose where is the generated program saved? if this solution doesn't exist, is there a workaround to automate this task? 

Thank you in advance for your assistance.

Best regards,
#2
You can call the command MakeProg to generate the program file, passing the program name. Example:
Code:
RDK.Command("MakeProg", "ProgramName")
You can select the post processor by calling the PostProcessor command. Example:
Code:
RDK.Command("PostProcessor", "post_processor_file.py")
You can also configure the path where you save your programs by calling the PathPrograms command. Example:
Code:
RDK.Command("PathPrograms", "path to save program")
This should not be confused with the API function MakeProgram which allows you to generate the program used in the API:
https://robodk.com/doc/en/PythonAPI/robo...akeProgram
#3
Hello Albert,

That worked perfectly.

Thank you for your assistance.
  




Users browsing this thread:
1 Guest(s)