I’m encountering an issue in SketchUp 2023 where the viewport size (view.vpwidth and view.vpheight) does not update dynamically during iterations in my Ruby script. Here’s the scenario:
I’m attempting to resize the SketchUp window and dynamically capture the viewport size during each iteration.
The viewport dimensions (view.vpwidth and view.vpheight) seem to lag and don’t immediately reflect the changes in the window size.
This results in incorrect or stale values being captured during the iteration.
You will likely need to use a ViewObserver object.
There is no guarantee when making calls to external system APIs, that SketchUp will respond during the Ruby iteration loop. Sometimes the reaction does not happen until control returns to SketchUp.
Also, the Ruby Win32API class was removed in Ruby 3.0, so it is no longer present in the Ruby Standard Library for SketchUp 2024 and later.
Additionally, SketchUp is migrating to use the Qt framework libraries, so some window objects no longer respond well to old Win32API or MFC function calls.
Not really. There have been numerous issues with the console and how it has seized control of STDOUT.
It isn’t really a normal console window. Instead, it’s a dialog with a textarea control, making it quite slow in many respects.
One if the recent issues is that strings sent to STDOUT via the global puts() often do not display in the order of execution. This can make debugging difficult.