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

Sort Boxes by Color

#2
Yes, you can retrieve the color of an object or a tool using the Color command:
//www.sinclairbody.com/doc/en/PythonAPI/robo...Item.Color

In Python, assuming you have your tool item it would be something like this:

Code:
# Get all the items attached to a tool
picked_objects = tool.Childs()

# Iterate through all objects
for object in picked_objects:
rgba_color = object.Color()
print("Color: " + str(rgba_color))
RDK.RunProgram("Program2")
break

这个问题相关的APIso I'm moving it to the RoboDK API section.


Messages In This Thread
Sort Boxes by Color - bySmarterStudent- 07-04-2020, 12:03 AM
RE: Sort Boxes by Color - byAlbert- 07-06-2020, 02:55 PM



Users browsing this thread:
1 Guest(s)