Setting camera eye
-
Hi there
I want to set my camera eye at the equivalent of zoom extents, would anyone know what array values to use?
By the way superb forum, have learnt so much through the people who post here.Regards
Brett -
You can directly invoke zoom_extents with a
send_action
see http://code.google.com/apis/sketchup/docs/ourdoc/sketchup.html#send_action (Sketchup.send_action("viewZoomExtents:")
). You could then reverse engineer theSketchup.active_model.active_view.camera.eye
from that if you still want it ? -
View.zoom_extents
http://code.google.com/apis/sketchup/docs/ourdoc/view.html#zoom_extents@unknownuser said:
The zoom_extents method is used to zoom to the extents about the entire model, as if the user has selected the zoom extents command from the menu.
From the docs it seem to be identical to
View.zoom
... Either the methods are aliases or the docs is wrong about one of these methods... -
model.active_view.zoom_extents
zooms to the model's extents
model.active_view.zoom(2.0)
zooms in x2
model.active_view.zoom(0.5)
zooms out x2
model.active_view.zoom(model.selection.to_a)
zooms to the extents of the selection
model.active_view.zoom([group1,group2])
zooms to the extents of the two groups specified in the array
model.active_view.zoom(group)
zooms to the extents of the group or one entity -
So the arguments that the docs claim for
.zoom_extent
is incorrect? -
@thomthom said:
So the arguments that the docs claim for
.zoom_extent
is incorrect?The linked doc has NO arguments for
view.zoom_extents
in the text - it only gives them forview.zoom()
- where it's either a float for the amount to zoom in/out >1.0/<1.0, OR an entity or an array of entities to zoom to the extents of...
The wrong examples are given for zoom_extents - they have been copied down fromview.zoom
in error !!!
-
I was looking at the example - didn't notice the example under
View.zoom_extents
saidView.zoom
. -
Should be fixed soon, I have submitted the change and it needs to be picked up by the servers.
thanks for the report.
Simone.
Advertisement