Forum Migration Notice
Update (2026-01-21): The user forums are now in read-only mode pending the data migration.
Update (2026-01-12): The user forums will be put into read-only mode on the 21st of January, 00:00 CET, to prepare for the data migration.
We're transitioning to a more modern community platform by beginning of next year. Learn about the upcoming changes and what to expect.
Update (2026-01-12): The user forums will be put into read-only mode on the 21st of January, 00:00 CET, to prepare for the data migration.
We're transitioning to a more modern community platform by beginning of next year. Learn about the upcoming changes and what to expect.
GraphicControl.ProjectPointToScreen returning bogus values?
Dirka3
✭
Copied from Upfeed forum since this may be more appropriate here...
Hello,
I'm trying to use the GraphicControl.ProjectPointToScreen(Vector3) method to get the appropriate XY screen location of an object that has been selected in the graphics view, in my case a primitive sphere with local coordinate system at the center.
The function is always returning X=(1/2 graphics window width) or (1/2 graphics window width + 1) (determined by selected object on left or right half of screen) and Y=0.
I have confirmed the Vector3 point I am asking for is correct by using the GraphicControl.ExaminePoint() method, the view immediately focuses on my selected sphere.
I have also tried scaling the Vector3 by various factors of ten, and the results are different, but the desired screen coordinate is never returned.
Has anyone else experienced issues with this method? Is there some kind of GraphicControl 'update' method i need to call before using ProjectPointToScreen?
Thanks!
Levi
Hello,
I'm trying to use the GraphicControl.ProjectPointToScreen(Vector3) method to get the appropriate XY screen location of an object that has been selected in the graphics view, in my case a primitive sphere with local coordinate system at the center.
The function is always returning X=(1/2 graphics window width) or (1/2 graphics window width + 1) (determined by selected object on left or right half of screen) and Y=0.
I have confirmed the Vector3 point I am asking for is correct by using the GraphicControl.ExaminePoint() method, the view immediately focuses on my selected sphere.
I have also tried scaling the Vector3 by various factors of ten, and the results are different, but the desired screen coordinate is never returned.
Has anyone else experienced issues with this method? Is there some kind of GraphicControl 'update' method i need to call before using ProjectPointToScreen?
Thanks!
Levi
Tagged:
0
Comments
-
Hi Levi,
I have tested and found that it works almost as intended.
Please note that the returned point is relative to the upper left corner of the graphics window (not the screen). There is however a bug that causes the Y value to be inverted and offset by 1/2 the window height...
That will be fixed in 6.06. This shows the (corrected) behavior:
https://youtu.be/9_wrEqBPcds
Regards,
Johannes
Post edited by Johannes Weiman onJohannes Weiman
Software Engineer
RobotStudio Team, ABB Robotics0 -
Hi Johannes,
Thanks for the report!
I can work around the Y bug until 6.06, that is great that is fixed.
After your video showed the X value working I tried creating my RobotStudio station from scratch in 6.05.01 and my problem with X returning incorrectly went away running the same add-in code. The station I previously tested on has been saved/upgraded through several versions of RobotStudio, starting with probably 6.0. This is just FYI, no further action required.
Thanks again!
Levi0
Categories
- All Categories
- 5.7K RobotStudio
- 402 UpFeed
- 21 Tutorials
- 16 RobotApps
- 307 PowerPacs
- 407 RobotStudio S4
- 1.8K Developer Tools
- 251 ScreenMaker
- 2.9K Robot Controller
- 368 IRC5
- 92 OmniCore
- 8 RCS (Realistic Controller Simulation)
- 859 RAPID Programming
- 43 AppStudio
- 4 RobotStudio AR Viewer
- 19 Wizard Easy Programming
- 111 Collaborative Robots
- 5 Job listings
