线程Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python API for RoboDK 5.4.0
#1
Information
In the intent of providing the best experience and flexibility to our users, we have recently released a new version of our Python API.

Version 5.4.0 is mostly restructuring our modules to prepare for future updates.
Although backward compatible, the changes are not forward compatible.

In other words, you can keep your current Python scripts as-is for past and future versions of RoboDK.
However, using the new semantic proposed by this update won't work with previous versions of RoboDK.

Effectively, the updates brings the robolink and robodk module into the robodk package, and splits the robodk module into submodules.
  • robolink is now robodk.robolink
  • robodk is now robodk.robomath, robodk.robodialogs and robodk.robofileio

Here's the new default Python script when adding a new script to a station:

Code:
# Type help("robodk.robolink") or help("robodk.robomath") for more information
# Press F5 to run the script
# Documentation: //www.sinclairbody.com/doc/en/RoboDK-API.html
# Reference: //www.sinclairbody.com/doc/en/PythonAPI/index.html
# Note: It is not required to keep a copy of this file, your Python script is saved with your RDK project
from robodk import robolink # RoboDK API
从robodk进口robomath #机器人工具箱
RDK = robolink.Robolink()

# Notify user:
print('To edit this program:\nright click on the Python program, then, select "Edit Python script"')

# Program example:
item = RDK.Item('base')
if item.Valid():
print('Item selected: ' + item.Name())
print('Item posistion: ' + repr(item.Pose()))

print('Items in the station:')
itemlist = RDK.ItemList()
print(itemlist)

raise Exception('Program not edited.')

We have updated all our documentations and public examples to reflect these changes.
You can find more information in our Python documentation and PyPI page:
Find useful information about RoboDK and its features by visiting our2022世界杯32强赛程表时间 and by watching tutorials on ourYouTube Channel.




Users browsing this thread:
1 Guest(s)