Add first line to program using API- Printable Version +- RoboDK Forum (//www.sinclairbody.com/forum) +-- Forum: RoboDK (EN) (//www.sinclairbody.com/forum/Forum-RoboDK-EN) +--- Forum: RoboDK API (//www.sinclairbody.com/forum/Forum-RoboDK-API) +--- Thread: Add first line to program using API (/Thread-Add-first-line-to-program-using-API) |
Add first line to program using API-Bradhoffm-05-09-2022 Hello, I am using the commands "InstructionSelect" and "RunInstruction" to modify robot programs with the RoboDK API. I have found that it is possible to add lines to any location in the program, except for the first instruction. Is it possible to add the first instruction of the program? RE: Add first line to program using API-Sam-05-12-2022 Hi, Here's how to reorder Program Instructions, which should allow you to insert an instruction as a first instruction.
Code:
# Example to reorder instructions
RE: Add first line to program using API-Bradhoffm-05-13-2022 Hi Sam, The sample code worked well. Thanks! |