I would like to get a view of the model dosn’t go beyond the scope of the SketchUp window.
Generaly it works, but from time to time, especialy when model on the begining is zoom in, after calling .zoom_extents the model is bigger then Sketchup window.
I suspect Dan’s last comment may be on the money. It is dangerous to assume that send_action executes synchronously rather than being queued up until a later moment when the Ruby API (or maybe the GUI) isn’t busy.
Yea, came from experience. I have a plugin that kept saving the model before the view changes were done. (Even with view transitions off and delay at 0.) I attempted to wrap it in a View observer, but there was still a bug, and I could not release the plugin. (I think the bug has been fixed a couple of versions ago, but I never got back to fixing the plugin.)