09-07-2021, 01:56 PM
(09-07-2021, 06:32 AM)Vineet Wrote:If you wish to update the WPR of targets, here is a script which will help you:
Code:from robolink import * # RoboDK API
from robodk import * # Robot toolbox
RDK = Robolink()
for i in range(1,4):
target_r = RDK.Item("Target %i" % i,ITEM_TYPE_TARGET)
target_pose = target_r.Pose()
xyzabc_1 = Pose_2_Fanuc(target_pose)
x,y,z,a,b,c = xyzabc_1
xyzabc_2 = [x,y,z,90,0,0] # Change the WPR here
target_pose = Fanuc_2_Pose(xyzabc_2)
RDK.Delete(target_r)
RDK.AddTarget("Target %i" %i )
target_add = RDK.Item("Target %i" % i,ITEM_TYPE_TARGET)
target_add.setPose(target_pose)
If you still wish to work with the a CSV, this example will give you a framework to get started://www.sinclairbody.com/doc/en/PythonAPI/exam...ram-xyzwpr
This is not what the issue is. I need to EXPORT target data into a CSV or TSV format OUT of robodk, not import data.
I should be able to highlight a group or targets, right click, Click "Export", Select File Type, and the script should export the XYZWPRE of the target into a CSV or TSV sheet.