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

Start RoboDK existing station using API


I am using the RoboDK version 5.2.4

Is there a way to start an existing station using the python API ? when executing the line RDK = Robolink(), it starts a fresh new station. However, I need to open an existing one to read the tool, frames and targets in the tree. Please let know if there is a way to do it

Best regards
For the Python API, using RDK = Robolink() should only open a new RoboDK window if its already not open. Can you tell me which Interpreter/Development Environment are you using?

I am using Spyder 4 that uses python version 3.8.5, is there another command that opens the station in order to extract the data ?

I saw in the help that we can open RoboDK without the user interface (-NOUI), my goal is to open the station without the user interface, extract the data and finally close it

Please let me know if this is possible

Best regards

Do you have any suggestion about opening an existing RoboDK station without the user interface (-NOUI), extracting the data using python and finally close it ?

Thank you
You simply have to pass the argument "-NOUI" to start RoboDK behind the scenes.

You can then use the RoboDK API normally. For example, you can use AddFile to load an RDK file.
Niceeee, thank you very much, that worked exactly as I expected

Thank you very much for your support and congratulations for your nice software ;-)
I wrote a as following:

from robodk.robolink import * # import the robolink library
RDK = Robolink(args='/NOUI')
#RDK = Robolink()
item = RDK.AddFile(r'C:\Car20231108.rdk')

robot = RDK.Item('Doosan Robotics M0617')
target = RDK.Item('Target112')
targetJoints= robot.Joints().list()

f = open("C:\RoboDK\Python37\demofile2.txt","w")
mystr= ""
for i in range(len(targetJoints) - 1):
mystr =mystr + str(targetJoints[i]) + ","

mystr =mystr + str(targetJoints[i])


And I opened in IDLE 3.7.4 and tried to run There was a error as follows:

==================== RESTART: C:\RoboDK\Python37\ ====================
Starting C:/RoboDK/bin/RoboDK.exe

RoboDK is Running...
Traceback (most recent call last):
File "C:\RoboDK\Python37\", line 4, in <module>
item = RDK.AddFile(r'C:\Car.rdk')
File "C:\RoboDK\Python37\lib\site-packages\robodk\", line 1765, in AddFile
newitem = self._rec_item()
File "C:\RoboDK\Python37\lib\site-packages\robodk\", line 829, in _rec_item
buffer = self.COM.recv(8)
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host

Would you please help me? Thanks.
I just got back to you on the other thread here:

Let's discuss this issue on the other thread.

Users browsing this thread:
1 Guest(s)