Page

SketchUp 6.0+

class

Parent: Entity

Introduction

The Page class contains methods to extract information and modify the properties of an individual page.

Note that inside the SketchUp user interface pages are called "Scenes".

Methods

Page.cameraSketchUp 6.0+

The camera method retrieves the camera for a particular page.

Returns:

camera
a Camera object if successful, nil if the page does not save camera information
 model = Sketchup.active_model
 pages = model.pages
 page = pages.add "My Page"
 camera = page.camera

Page.delay_timeSketchUp 6.0+

The delay_time method retrieves the amount of time, in seconds, that a page will be displayed before transition to another page during a tour.

The default delay time can be modified in the Model Info > Animation panel of the SketchUp User Interface. If this method returns -1, the default delay time is used.

Returns:

time
the number of seconds of delay
 model = Sketchup.active_model
 pages = model.pages
 page = pages.add "My Page"
 time = page.delay_time

Page.delay_time=SketchUp 6.0+

The delay_time= method sets the amount of time, in seconds, that a page will be displayed before transitioning to another page during a tour. If you set the delay for a page to be -1, the default delay time will be used.

The default delay time can be modified in the Model Info > Animation panel of the SketchUp User Interface.

Arguments:

seconds
The number of seconds to set as the delay time.

Returns:

time
the number of seconds of delay
 model = Sketchup.active_model
 pages = model.pages
 page = pages.add "My Page"
 time = page.delay_time = 10

Page.descriptionSketchUp 6.0+

The description method retrieves the description for a page as found in the Scenes manager dialog.

Returns:

description
a textual description for the page.
 model = Sketchup.active_model
 pages = model.pages
 page = pages.add "My Page"
 description = page.description

Page.description=SketchUp 6.0+

The description method sets the description for a page as found in the Scenes manager dialog.

Arguments:

description
A string description for the page.

Returns:

description
the new string description for the page
 model = Sketchup.active_model
 pages = model.pages
 page = pages.add "My Page"
 description = page.description = "This is my first page"

Page.hidden_entitiesSketchUp 6.0+

The hidden_entities method retrieves all hidden entities within a page.

Returns:

entities
an Entities object containing hidden entities on the page.
 model = Sketchup.active_model
 pages = model.pages
 page = pages.add "My Page"
 entities = page.hidden_entities

Page.labelSketchUp 6.0+

The label method retrieves the label for a page from the page tab.

Returns:

label
a string label for the page tab
 model = Sketchup.active_model
 pages = model.pages
 page = pages.add "My Page"
 label = page.label

Page.layersSketchUp 6.0+

The layers method retrieves the non-visible layers associated with a page.

Returns:

layers
an array with zero or more Layers objects.
 model = Sketchup.active_model
 pages = model.pages
 page = pages.add "My Page"
 layers = page.layers
 # layers now contains the layers in the model that are
 # set to non-visible on the page

Page.nameSketchUp 6.0+

The name method retrieves the name for a page from the page tab.

Returns:

label
a string name for the page tab
 model = Sketchup.active_model
 pages = model.pages
 page = pages.add "My Page"
 name = page.name

Page.name=SketchUp 6.0+

The name= method sets the name for a page's tab.

Arguments:

name
The name of the page to be set.

Returns:

name
the name that you have set
 model = Sketchup.active_model
 pages = model.pages
 page = pages.add "My Page"
 name = page.name = "Page Name"

Page.rendering_optionsSketchUp 6.0+

The rendering_options method retrieves a RenderingOptions object for the page.

Returns:

renderingoptions
a RenderingOptions object
 model = Sketchup.active_model
 pages = model.pages
 page = pages.add "My Page"
 renderingoptions = page.rendering_options

Page.set_visibilitySketchUp 6.0+

The set_visibility method sets the visibility for a layer on a page.

Arguments:

layer
The layer whose visibility you are setting.
visibility
true if you want items on the layer to be visible, false if you do not want items visible.

Returns:

page
the page whose visibility was set.
 model = Sketchup.active_model
 pages = model.pages
 page = pages.add "My Page"
 layer = page.layers[0]
 visibility = true
 page = page.set_visibility layer, visibility

Page.shadow_infoSketchUp 6.0+

The shadow_info method retrieves the ShadowInfo object for the page.

Returns:

shadowinfo
a ShadowInfo object if successful, nil if the page does not save shadow information
 model = Sketchup.active_model
 pages = model.pages
 page = pages.add "My Page"
 shadowinfo = page.shadow_info

Page.styleSketchUp 6.0+

The style method retrieves the style associated with the page.

Returns:

style
the Style object if successful
 model = Sketchup.active_model
 pages = model.pages
 page = pages.add "My Page"
 style = page.style

Page.transition_timeSketchUp 6.0+

Get the amount of time that it takes to transition to this page during a slideshow or animation export. If this value is -1, it means to use the default transition time.

Returns:

transitiontime
the amount of time it takes to transition to this page during a slideshow or animation export.
 model = Sketchup.active_model
 pages = model.pages
 page = pages.add "My Page"
 time = page.transition_time

Page.transition_time=SketchUp 6.0+

The transition_time= method is used to set the transition time.

Arguments:

trans_time
The transition time in seconds.

Returns:

transitiontime
the new transition time
 model = Sketchup.active_model
 pages = model.pages
 page = pages.add "My Page"
 time = page.transition_time=20

Page.updateSketchUp 6.0+

The update method performs an update on the page properties based on the current view that the user has. Which parts of the Page get updated are controlled via an integer whose bits represent which parts to update. You can determine the integer you need to pass by adding these numbers together:

  • 1 - Camera Location,
  • 2 - Drawing Style,
  • 4 - Shadow Settings,
  • 8 - Axes Location,
  • 16 - Hidden Geometry,
  • 32 - Visible Layers,
  • 64 - Active Section Planes.


The bit code values are added together to provide the flags value. For example, to update the Camera Location, Axes Location, and Active Section Planes properties, the flag would be 73 (1 + 8 + 64).

Arguments:

flags
Integer representing the sum of the bit flags.

Returns:

status
true if successful, false if unsuccessful
 model = Sketchup.active_model
 pages = model.pages
 page = pages.add "My Page"
 status = page.update

 # Updates Camera Location (+1), Shadow Settings(+4),
 # and Visible Layers (+32).
 status = page.update(37) 

Page.use_axes=SketchUp 6.0+

The use_axes= method sets the page's axes property.

Arguments:

pagesetting
true if you want your page to save this property, false if you do not want your page to save this property.

Returns:

status
true if you are saving the property, false if you are not saving the property.
 model = Sketchup.active_model
 pages = model.pages
 page = pages.add "My Page"
 # Set use_axes to false
 status = page.use_axes=false

Page.use_axes?SketchUp 6.0+

The use_axes? method determines whether you are storing the axes property with the page.

Returns:

status
true if you are storing the this property with the page, false if you are not storing this property with the page.
 model = Sketchup.active_model
 pages = model.pages
 page = pages.add "My Page"
 status = page.use_axes?

Page.use_camera=SketchUp 6.0+

The use_camera= method sets the page's camera property.

Arguments:

setting
true if you want your page to save this property, false if you do not want your page to save this property.

Returns:

status
true if you are saving the property, false if you are not saving the property.
 model = Sketchup.active_model
 pages = model.pages
 page = pages.add "My Page"
 status = page.use_camera = true

Page.use_camera?SketchUp 6.0+

The use_camera? method determines whether you are storing the camera property with the page.

Returns:

status
true if you are storing the this property with the page, false if you are not storing this property with the page.
 model = Sketchup.active_model
 pages = model.pages
 page = pages.add "My Page"
 status = page.use_camera?

Page.use_hidden=SketchUp 6.0+

The use_hidden= method sets the page's hidden property.

Arguments:

setting
true if you want your page to save this property, false if you do not want your page to save this property.

Returns:

status
true if you are saving the property, false if you are not saving the property.
 model = Sketchup.active_model
 pages = model.pages
 page = pages.add "My Page"
 status = page.use_hidden=false

Page.use_hidden?SketchUp 6.0+

The use_hidden? method determines whether you are storing the hidden property with the page.

Returns:

status
true if you are storing the this property with the page, false if you are not storing this property with the page.
 model = Sketchup.active_model
 pages = model.pages
 page = pages.add "My Page"
 status = page.use_hidden?

Page.use_hidden_layers=SketchUp 6.0+

The use_hidden_layers= method sets the page's hidden layers property.

Arguments:

setting
true if you want your page to save this property, false if you do not want your page to save this property.

Returns:

status
true if you are saving the property, false if you are not saving the property.
 model = Sketchup.active_model
 pages = model.pages
 page = pages.add "My Page"
 status = page.use_hidden_layers = false

Page.use_hidden_layers?SketchUp 6.0+

The use_hidden_layers? method determines whether you are storing the hidden layers property with the page.

Returns:

status
true if you are storing the this property with the page, false if you are not storing this property with the page.
 model = Sketchup.active_model
 pages = model.pages
 page = pages.add "My Page"
 status = page.use_hidden_layers?

Page.use_rendering_options=SketchUp 6.0+

The use_rendering_optoins= method sets the page's display settings property.

Arguments:

setting
true if you want your page to save this property, false if you do not want your page to save this property.

Returns:

status
true if you are saving the property, false if you are not saving the property.
 model = Sketchup.active_model
 pages = model.pages
 page = pages.add "My Page"
 status = page.use_rendering_options = false

Page.use_rendering_options?SketchUp 6.0+

The use_rendering_options? method determines whether you are storing the rendering options property with the page.

Returns:

status
true if you are storing the this property with the page, false if you are not storing this property with the page.
 model = Sketchup.active_model
 pages = model.pages
 page = pages.add "My Page"
 status = page.use_rendering_options?

Page.use_section_planes=SketchUp 6.0+

The use_section_planes= method sets the page's section planes property.

Arguments:

setting
true if you want your page to save this property, false if you do not want your page to save this property.

Returns:

status
true if you are saving the property, false if you are not saving the property.
 model = Sketchup.active_model
 pages = model.pages
 page = pages.add "My Page"
 status = page.use_section_planes=false

Page.use_section_planes?SketchUp 6.0+

The use_section_planes? method determines whether you are storing the section planes property with the page.

Returns:

status
true if you are storing the this property with the page, false if you are not storing this property with the page.
 model = Sketchup.active_model
 pages = model.pages
 page = pages.add "My Page"
 status = page.use_section_planes?

Page.use_shadow_info=SketchUp 6.0+

The use_shadow_info= method sets the page's shadow info property.

Arguments:

setting
true if you want your page to save this property, false if you do not want your page to save this property.

Returns:

status
true if you are saving the property, false if you are not saving the property.
 model = Sketchup.active_model
 pages = model.pages
 page = pages.add "My Page"
 status = page.use_shadow_info=false

Page.use_shadow_info?SketchUp 6.0+

The use_shadow_info? method determines whether you are storing the shadow info property with the page.

Returns:

status
true if you are storing the this property with the page, false if you are not storing this property with the page.
 model = Sketchup.active_model
 pages = model.pages
 page = pages.add "My Page"
 status = page.use_shadow_info?

Page.use_style=SketchUp 6.0+

The use_style= method sets the style to be used by the page.

Arguments:

style
The Style object to use.

Returns:

nil
 model = Sketchup.active_model
 pages = model.pages
 page = pages.add "My Page"
 style = model.styles[0]
 page.use_style = style

Page.use_style?SketchUp 6.0+

The use_style? method determines whether storing a style with the page.

Returns:

status
true if you are storing the this property with the page, false if you are not storing this property with the page.
 model = Sketchup.active_model
 pages = model.pages
 page = pages.add "My Page"
 use_style = page.use_style?

  

Trimble Home
About Trimble - Privacy Policy - Contact Us