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

Select Istruction from Program and Add New Istruction

#1
I would like to select two istruction from a program already created and convert them from Linear to Circular.
Is that possible?
#2
You can't convert 2 linear movements to one circular movement. However, you can retrieve the 2 targets of your linear movement and create a circular movement:
  • Right click the 2 move instructions.
  • Select Select Targets. You'll see the 2 targets as selected.
Select Program-Move Circular Instruction to add a circular movement.
#3
(09-25-2019, 05:37 PM)Albert Wrote:You can't convert 2 linear movements to one circular movement. However, you can retrieve the 2 targets of your linear movement and create a circular movement:
  • Right click the 2 move instructions.
  • Select Select Targets. You'll see the 2 targets as selected.
Select Program-Move Circular Instruction to add a circular movement.

Fine. My main problem is to retrive the ID of the selected istruction and to add new istruction ( the circular one) in the right place and not at the end of the program.
#4
You can then select the instruction you are currently using before you add the circular movement. Then, the circular movement will be added after that movement.

With the API you can do it the following way:
Code:
program.InstructionSelect (id)
program.MoveC(target1,target2)

More information here:
//www.sinclairbody.com/doc/en/PythonAPI/robo...tionSelect
#5
(09-26-2019, 10:00 AM)Albert Wrote:You can then select the instruction you are currently using before you add the circular movement. Then, the circular movement will be added after that movement.

With the API you can do it the following way:
Code:
program.InstructionSelect (id)
program.MoveC(target1,target2)

More information here:
//www.sinclairbody.com/doc/en/PythonAPI/robolink.html#robolink.Item.InstructionSelect

Is possibile to remove the istruction that i do not need
example:

Code:
ITEM = program.InstructionSelect(ID)
program.Delete(ITEM)
[url=//www.sinclairbody.com/doc/en/PythonAPI/robolink.html#robolink.Item.InstructionSelect][/url]
#6
Hi Stefano,

Yes, you can delete instructions given an instruction:
Code:
program.InstructionDelete(instruction_id)

More information here:
//www.sinclairbody.com/doc/en/PythonAPI/robo...tionDelete

This option was added recently so if you don't see this command you should update to the latest version of RoboDK.

Albert




Users browsing this thread:
1 Guest(s)