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

Recalculating Targets

#1
I'm trying to generate robot programs from programs in my simulation. Manually, I must right-click on the program and click on "Recalculate targets" before clicking "Generate Robot Program". If I don't recalculate targets, the generated robot program does not have the correct targets. I would like to recalculate targets and generate robot program from the Python API (my simulation is generated from the API). I can generate the robot programs using the following:

Code:
program.MakeProgram(filepath, RUNMODE_MAKE_ROBOTPROG)

However, I have not found a method for recalculating targets before generating the program.

I tried:
Code:
program.Update()

But this still did not write the correct targets to the generated program. Has anyone been able to resolve this issue?

Thank you
#2
You can use program.setParam("RecalculateTargets")
Please read the论坛Guidelinesbefore posting!
Find useful information about RoboDK by visiting our2022世界杯32强赛程表时间 .
#3
(06-30-2022, 05:54 PM)Sam Wrote:You can use program.setParam("RecalculateTargets")

Sam,

Thank you so much! Is documentation available for all these setParam() parameters? Is there a dictionary with all these parameters publicly documented?
#4
You can selectTools->Run script->ShowCommandsto see the available RoboDK commands and item parameters you can set.

The script is available in the RoboDK install folder if you want to take a look, it shows how to retrieve the list through the API as an HTML table.
Please read the论坛Guidelinesbefore posting!
Find useful information about RoboDK by visiting our2022世界杯32强赛程表时间 .




Users browsing this thread:
1 Guest(s)