Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Export CSV or TSV data from RoboDK Target Data
#1
Howdy,

这将是伟大的脚本或特性can export "Target" data (XYZWPR and E *external axis*) as a CSV or TSV file.

I have found that I use RoboDK to reverse engineer point data that does not include vector parameters like WPR or IJK, so it would be great to be able to create "Targets" from imported point data from Solidworks, then be able to export all of the "Target Data" back out with updated WPR or IJK parameters.

Contact me if further explanations are required!
#2
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.x7093.com/doc/en/PythonAPI/exam...ram-xyzwpr
#3
(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.x7093.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.




Users browsing this thread:
1 Guest(s)