# SectionPlane Active Cut in Ruby

**URL:** <https://forums.sketchup.com/t/sectionplane-active-cut-in-ruby/37113>\
**Category:** Ruby API\
**Tags:** sectionplanes\
**Created:** [January 10, 2017, 3:07pm UTC](https://forums.sketchup.com/t/sectionplane-active-cut-in-ruby/37113 "2017-01-10T15:07:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jpz](https://avatars.discourse-cdn.com/v4/letter/j/ba8739/32.png) [@jpz](https://forums.sketchup.com/u/jpz)\
**Post date:** [January 10, 2017, 3:07pm UTC](https://forums.sketchup.com/t/sectionplane-active-cut-in-ruby/37113/1 "2017-01-10T15:07:48Z")

</div>

I am unable to set the active cut in Ruby and have it display in a Scene (Page). I have tried both the active\_section\_plane(sec\_plane) method and the activate method and neither seem to set the active cut. If I use menu View/Hidden Geometry, tool Display Section Planes, Display Section Cuts and the context menu Active Cut with the desired plane selected all works. But I am unable to code this in Ruby and get the same results.

I have the style used by the page set to display the Section Cuts. Which of the above methods is the correct one to use or is there another method, or options I need to set?

Joe…

---

<div class="post-metadata">

**Author:** ![DanRathbun](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/danrathbun/32/500_2.png) [@DanRathbun](https://forums.sketchup.com/u/DanRathbun)\
**Post date:** [January 10, 2017, 5:54pm UTC](https://forums.sketchup.com/t/sectionplane-active-cut-in-ruby/37113/2 "2017-01-10T17:54:41Z")

</div>

Firstly, I myself have had funky problems with active section planes and scene pages (especially trying to animate the movement of section planes.)

Perhaps this might help:  
`page.use_section_planes= true`

Did you call `page.update(127)`, and then perhaps `view.refresh`, after your previous code ?

* * *

Other then that, when you want help with code, it’s best to post a method that attempts to do what you wish. Wrap the code snippet in lines of triple backticks (key left of the 1 key) and add the word ruby on the first line of backticks with no intervening space, ie : ```ruby

---

<div class="post-metadata">

**Author:** ![jpz](https://avatars.discourse-cdn.com/v4/letter/j/ba8739/32.png) [@jpz](https://forums.sketchup.com/u/jpz)\
**Post date:** [January 10, 2017, 5:59pm UTC](https://forums.sketchup.com/t/sectionplane-active-cut-in-ruby/37113/3 "2017-01-10T17:59:48Z")

</div>

Hi Dan,

Yes, I did call page.update(127) and view.refresh. But I did not call page.use\_section\_planes= true. I will give that a try. Thanks for the help and suggestion re:future code help.

Joe…

---

<div class="post-metadata">

**Author:** ![jpz](https://avatars.discourse-cdn.com/v4/letter/j/ba8739/32.png) [@jpz](https://forums.sketchup.com/u/jpz)\
**Post date:** [January 10, 2017, 6:17pm UTC](https://forums.sketchup.com/t/sectionplane-active-cut-in-ruby/37113/4 "2017-01-10T18:17:35Z")

</div>

Hi Dan,

I tried calling page.use\_section\_planes= true and also page.use\_rendering\_options = true. Neither helped. I am tied up right at the moment, but as soon as I get some time I will post some code snippets for all to see. Rendering a section cut should be simple and straight forward, but I am running out of ideas. Frustrating!

Joe…
