05-14-2018, 10:59 AM
Hi Julian,
To display messages from your Python program to RoboDK window you can use the following command:
Robolink.ShowMessage("Your message", blocking = True)
If you set it to non-blocking the message will be displayed in the status bar of the RoboDK window. If you start a Python script from RoboDK, all the prints done in Python (stdout, stderr) are shown only if your script fails.
You can start your own Python program independently and interact with RoboDK using the RoboDK API for Python. The RoboDK API uses internal TCP/IP communication so you could even control RoboDK remotely. You'll find some additional settings in:
pip install robodk
There are some command line options to start RoboDK:
//www.sinclairbody.com/doc/en/RoboDK-API.html#CommandLine
例如,这可以让你保持RoboDK hidden while you set up your project.
On Mac, RoboDK automatically uses the following folder as the Python Path when you start a Python script from RoboDK:
/Applications/RoboDK.app/Contents/Python/
Also, The latest version of RoboDK for Mac (v3.4.6) properly includes the Robolink.Selection() method.
Albert
To display messages from your Python program to RoboDK window you can use the following command:
Robolink.ShowMessage("Your message", blocking = True)
If you set it to non-blocking the message will be displayed in the status bar of the RoboDK window. If you start a Python script from RoboDK, all the prints done in Python (stdout, stderr) are shown only if your script fails.
You can start your own Python program independently and interact with RoboDK using the RoboDK API for Python. The RoboDK API uses internal TCP/IP communication so you could even control RoboDK remotely. You'll find some additional settings in:
- RoboDK-Preferences-Other-RoboDK API (if you are using a Mac)
- Tools-Options-Other-RoboDK API (for Windows and Linux)
pip install robodk
There are some command line options to start RoboDK:
//www.sinclairbody.com/doc/en/RoboDK-API.html#CommandLine
例如,这可以让你保持RoboDK hidden while you set up your project.
On Mac, RoboDK automatically uses the following folder as the Python Path when you start a Python script from RoboDK:
/Applications/RoboDK.app/Contents/Python/
Also, The latest version of RoboDK for Mac (v3.4.6) properly includes the Robolink.Selection() method.
Albert