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

Generate a robot program through python API

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,
You can call the command MakeProg to generate the program file, passing the program name. Example:
RDK.Command("MakeProg", "ProgramName")
You can select the post processor by calling the PostProcessor command. Example:
RDK.Command("PostProcessor", "")
You can also configure the path where you save your programs by calling the PathPrograms command. Example:
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:
Hello Albert,

That worked perfectly.

Thank you for your assistance.

Users browsing this thread:
1 Guest(s)