RoboDK Forum
Setting "preferred orientation" or "teach" button using python api可打印版本

+- 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: Setting "preferred orientation" or "teach" button using python api (/Thread-Setting-preferred-orientation-or-teach-button-using-python-api)



Setting "preferred orientation" or "teach" button using python api-kreys-05-12-2022

I'm running into an issue where we have to "teach" the preferred tool x axis orientation otherwise we have some issues later down the line. Is there an easy way to automate this "clicking" of the teach button by python api?

I have a script with a for loop that updates some other basic items for all of the programs that id like to use for this teach.


RE: Setting "preferred orientation" or "teach" button using python api-Albert-05-12-2022

Yes, you can provoke theTeachbutton in a robot machining project using the API.

This example shows how to do it:
Code:
from robolink import *
RDK = Robolink()

# Choose your robot machining project:
pathsettings = RDK.ItemUserPick("Choose a robot machining toolpath", ITEM_TYPE_MACHINING)

# Provoke the Teach action:
pathsettings.setParam("Orient", "Teach")



RE: Setting "preferred orientation" or "teach" button using python api-kreys-05-12-2022

Excellent! Thanks for the information.