Page UpDate problems
-
My script creates a new page and adds several views of a component then finishes with
Sketchup.active_model.active_view.camera.perspective = false Sketchup.send_action "viewFront;" Sketchup.send_action "viewZoomExtents;" Sketchup.send_action "pageUpdate;"
However it often does not update the page view. If I select the page then the view shows as expected so the actions were applied except for the final update of the view.
I had seen a comment here about how to fix this and had copied the info but now that I want to use it it's not where I can find it. Any Suggestions??
Keith
-
Just in case, (think you already done but...) did you try
Sketchup.active_model.active_view.refresh ?
Yours
Pascal -
Have you tried using the methods on the View and Camera object directly instead of the send_actions?
send_actions isn't the best to use ... personally I wish they weren't there. There should be proper API methods for them instead.
-
The view refresh worked. Thanks.
Keith
-
As I recall from the last build cycle (2013,) the
Sketchup::Page
andSketchup::Pages
classes had issues filed on them regarding updates not working correctly. (As well as a bunch of feature addtions, by myself.)
Advertisement