RoboDK Forum
Naming generated program可打印版本

+- RoboDK Forum (//m.sinclairbody.com/forum)
+-- Forum: RoboDK (EN) (//m.sinclairbody.com/forum/Forum-RoboDK-EN)
+--- Forum: RoboDK API (//m.sinclairbody.com/forum/Forum-RoboDK-API)
+--- Thread: Naming generated program (/Thread-Naming-generated-program)



Naming generated program-Kloper-10-30-2020

I am trying to generate a Kuka program over the RDK API.
It is basically working with this script, but the issue I have is that I cant find a way to properly name my program.

Code:
from robolink import *
RDK = Robolink()

prog = RDK.Item('Robot paint', ITEM_TYPE_PROGRAM_PYTHON)

prog.RunProgram()

RDK.setRunMode(RUNMODE_MAKE_ROBOTPROG)

while prog.Busy():
暂停(0.1)

print("Program done")

The program that is generated is always named: ProgKUKAKR6R900s.
I am using the RobotPaint example from RDK but I replaced the robot with Kukas agilus.


I hope somebody can tell me how to name my program, and let me know if this is even the proper way of generating the program over the API. All this is very new to me.

Thanks.


RE: Naming generated program-Jeremy-10-30-2020

Hi Kloper,

I think this is what you are looking for://m.sinclairbody.com/doc/en/PythonAPI/robolink.html#robolink.Item.setName

Jeremy


RE: Naming generated program-Kloper-10-30-2020

(10-30-2020, 03:09 PM)Jeremy Wrote:Hi Kloper,

I think this is what you are looking for://m.sinclairbody.com/doc/en/PythonAPI/robolink.html#robolink.Item.setName

Jeremy

Hi Jeremy,
thanks for the feedback!
I did try that, but it only changes the program name in the RoboDK Scene, how ever the exported file name still stays the same "ProgKUKAKR6R900s.src"

Maybe I am using it wrong: prog.setName('TestName')

Thanks,
Romano


RE: Naming generated program-Jeremy-10-30-2020

My bad then.

Pretty sure this is what you are looking for.
//m.sinclairbody.com/doc/en/PythonAPI/robolink.html#robolink.Robolink.ProgramStart

Jeremy