# Changing the Camera of a Page in Ruby API

**URL:** <https://forums.sketchup.com/t/changing-the-camera-of-a-page-in-ruby-api/24572>\
**Category:** Ruby API\
**Created:** [May 3, 2016, 8:32pm UTC](https://forums.sketchup.com/t/changing-the-camera-of-a-page-in-ruby-api/24572 "2016-05-03T20:32:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![radparker](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/radparker/32/18213_2.png) [@radparker](https://forums.sketchup.com/u/radparker)\
**Post date:** [May 3, 2016, 8:32pm UTC](https://forums.sketchup.com/t/changing-the-camera-of-a-page-in-ruby-api/24572/1 "2016-05-03T20:32:01Z")

</div>

Is there a way to change the camera information of a given scene/page? Ultimately, I’d like to be able to do so without actually changing the current view to the scene/page’s view programatically, so that I can maintain the current view of the user. With that said, I can’t seem to find any methods to change the values of the camera parameters of a scene/page. I’ve tried doing Sketchup.active\_model.pages.selected\_page.camera.set eye, target, up (with my new values for eye, target, and up), but nothing seems to happen. Any suggestions would be greatly appreciated!

---

<div class="post-metadata">

**Author:** ![radparker](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/radparker/32/18213_2.png) [@radparker](https://forums.sketchup.com/u/radparker)\
**Post date:** [May 3, 2016, 8:45pm UTC](https://forums.sketchup.com/t/changing-the-camera-of-a-page-in-ruby-api/24572/2 "2016-05-03T20:45:45Z")

</div>

I believe that I found a solution, so I’ll post it here:

current\_page.use\_camera = false  
current\_page.camera.set eye, target, up  
current\_page.update(1)  
current\_page.use\_camera = true

Feel free to correct in case I’ve misinterpreted the API
