07-06-2020, 02:55 PM
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:
这个问题相关的APIso I'm moving it to the RoboDK API section.
//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.