Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Force Original Pose (Set tool)
#1
Hi
When generating a program through the C# API I am setting the tool.
The 'Force original pose' option is automatically selected.
How can I deselect this through the API when I generate the instruction for set tool?

I use the code on the instruction at the moment

Program.setInstruction(insID, name, instrType, movetype, jointTarget, target, joints);

Regards
Andy


Attached Files Image(s)
   
#2
I'm transferring this to the API section.

Jeremy
Find useful information about RoboDK and its features by visiting our Online Documentation and by watching tutorials on our Youtube Channel


#3
Hi Andy,

We just updated our API so you can use the parameter ForcePose with setParam on a program. 
For example, if your instruction to change the tool is the second instruction (index 1), you can do:

Code:
from robolink import *
RDK = Robolink()
p = RDK.Item('', ITEM_TYPE_PROGRAM)

# Modify instruction 2 of program p (Set Tool, instruction id=1)
instruction_data = p.setParam(1)
print(instruction_data)
instruction_data["ForcePose"] = 1 # 1=checked, 0=unchecked
p.setParam(1, instruction_data)

# Or simply apply your desired modification:
instruction_data = {}
instruction_data["ForcePose"] = 1 # 1=checked, 0=unchecked
p.setParam(1, instruction_data)
A more complete example is available here:
https://robodk.com/doc/en/PythonAPI/exam...structions
#4
You need to update RoboDK to the latest version to access this new feature.

Jérémy
Find useful information about RoboDK and its features by visiting our Online Documentation and by watching tutorials on our Youtube Channel


#5
that's great thanks guys
  




Users browsing this thread:
1 Guest(s)