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

How to move through views created with the view manager using Python

#1
I have defined and saved several views in the RoboDK environment. How can I switch between these views at any time using the Python programming language? I used the following example but it didn't work:

Code:
robolink.Item.setPose('Viewname')
#2
You should use setViewPose to update the position of the camera view:
https://robodk.com/doc/en/PythonAPI/robo...etViewPose

Example:
Code:
# retrieve the camera view:
pose = RDK.ViewPose()
# ...
# Set the camera view
RDK.setViewPose(pose)
#3
(09-18-2023, 09:03 AM)Albert Wrote: You should use setViewPose to update the position of the camera view:
https://robodk.com/doc/en/PythonAPI/robo...etViewPose

Example:
Code:
# retrieve the camera view:
pose = RDK.ViewPose()
# ...
# Set the camera view
RDK.setViewPose(pose)

Thank you very much for your guidance and explanation.
I have saved some views like in the figure and I want to go or move between these viewpoints in the python program I wrote based on the task schedule of the robots. And I did not understand how to declare these names (for example view 03-side) in the program. Unfortunately, there are not enough examples for some functions and methods in the RoboDK documentation. Is there a way that I can use these predefined viewpoints in my programming?


Attached Files Thumbnail(s)
   
#4
The View Manager Add-in source code is available in our GitHub. You can see how to load and save views:
https://github.com/RoboDK/Plug-In-Interf...oadView.py
https://github.com/RoboDK/Plug-In-Interf...aveView.py
Please read the Forum Guidelines before posting!
Find useful information about RoboDK by visiting our Online Documentation.
#5
(09-18-2023, 02:58 PM)Sam Wrote: The View Manager Add-in source code is available in our GitHub. You can see how to load and save views:
https://github.com/RoboDK/Plug-In-Interf...oadView.py
https://github.com/RoboDK/Plug-In-Interf...aveView.py

Thank you for the explanation and the link, I will definitely share the logic of the code here so that other friends can also use it.
  




Users browsing this thread:
1 Guest(s)