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

FAQ: Python API

#1
Frequently Asked Question (FAQ) about the RoboDK Python API

Q: What is the RoboDK Python API?
A: The RoboDK Python API is a programming interface that allows you to communicate with the RoboDK software using the Python programming language.

Q: What are some common use cases for the RoboDK Python API?
A: Some common use cases for the RoboDK Python API include:
  • Generating robot programs automatically based on CAD models or other data
  • Simulating robot movements to validate programs before running them on a real robot
  • Controlling external devices, such as sensors or grippers, using robot movements
  • Customizing the user interface of RoboDK to meet specific needs
Q: What components of RoboDK itself relies on the Python API?
A: RoboDK depends on the Python API for the following components:
  • RoboDK robot post processors
  • RoboDK robot drivers, and other external devices
  • RoboDK Apps (Python add-ins)
Q: What programming skills do I need to use the RoboDK Python API?
A: To use the RoboDK Python API, you should have a basic understanding of programming concepts and experience using Python. It may also be helpful to have some knowledge of robotics.

Q: How do I install the RoboDK Python API?
A: To install the RoboDK Python API, download and install RoboDK. RoboDK ships with a matching version of the Python API under %ROBODK_FOLDER%/Python, which is added to %PYTHONPATH%. The RoboDK Python API is also available on the Python Package Index (PyPI): https://pypi.org/project/robodk/.

Q: How do I get started with the RoboDK Python API?
A: To get started with the RoboDK Python API, you can read the documentation, try the examples provided, and experiment with your own code: https://robodk.com/doc/en/PythonAPI/index.html.

Q: Is the RoboDK Python API free to use?
A: Yes, the RoboDK Python API is free to use with the RoboDK software. However, you may need to purchase a license for RoboDK depending on your specific use case.

Q: Where can I learn more about the RoboDK Python API?
A: Below are some relevant links for the Python API: Q: Can I use a different Python interpreter than the one that comes with RoboDK?
A: Yes, you can set the desired Python interpreter in Tools->Options->Python. You are responsible for installing required dependencies if you provide your own interpreter.

Q: How can I install the RoboDK Python API through pip in my own Python interpreter?
A: Note that RoboDK will always add C:/RoboDK/Python/ to %PYTHONPATH% when launching scripts from RoboDK (more information on %PYTHONPATH% here: https://docs.python.org/3/using/cmdline....PYTHONPATH).

To use the RoboDK Python API that ships with your version of RoboDK, use the following pip command (Windows):
Code:
C:/path/to/python.exe pip install -e C:/RoboDK/Python/.

To install the latest version of the RoboDK Python API from PyPI, use the following pip command (Windows):
Code:
C:/path/to/python.exe pip install robodk --upgrade

Q: Python is reporting errors when I "Generate Robot Program". What should I do?
A: Python errors when generating robot programs with our post processors is often due to the Python interpreter.
  • Make sure that the Python interpreter is valid: RoboDK->Tools->Options->Python.
  • Alternatively, you can "Set the Default Python settings".
  




Users browsing this thread:
1 Guest(s)