Class: Sketchup::Page
| Relationships | |
| Super Chains via Extension / Inclusion / Inheritance | |
|
Class Chain:
self,
Entity
|
|
|
Instance Chain:
self,
Entity
|
|
| Inherits: |
Sketchup::Entity
|
Overview
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”.
Since SketchUp 2026.0, modifying the Axes, Camera, RenderingOptions, and ShadowInfo properties of a page is an undoable operation and should be wrapped between Model#start_operation and Model#commit_operation. Example:
model = Sketchup.active_model
pages = model.pages
origin = Geom::Point3d.new(10, 0, 0)
model.start_operation("Set Page Properties")
page = pages.add("My Page")
page.axes.set(origin, Y_AXIS, X_AXIS, Z_AXIS)
page.camera.fov = 56.78
page.shadow_info["City"] = "Brasov, Romania"
page.["BackgroundColor"] = "Pink"
model.commit_operation
Instance Attribute Summary
-
#delay_time ⇒ Object
rw
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.
-
#delay_time=(seconds) ⇒ Object
rw
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.
-
#description ⇒ Object
rw
The description method retrieves the description for a page as found in the Scenes manager dialog.
-
#description=(description) ⇒ Object
rw
The description method sets the description for a page as found in the Scenes manager dialog.
-
#environment ⇒ Sketchup::Environment
rw
The #environment method is used to retrieve the
Environmentfor the scene. -
#environment=(environment) ⇒ Sketchup::Environment
rw
The #environment= method is used to set the
Environmentfor the scene. -
#include_in_animation=(include) ⇒ Sketchup::Page
rw
The #include_in_animation= method controls whether the page should be included when exporting an animation from the model.
-
#include_in_animation? ⇒ Boolean
rw
The #include_in_animation? method determines whether the page should be included when exporting an animation from the model.
-
#name ⇒ Object
rw
The name method retrieves the name for a page from the page tab.
-
#name=(name) ⇒ Object
rw
The #name= method sets the name for a page’s tab.
-
#transition_time ⇒ Object
rw
Get the amount of time that it takes to transition to this page during a slideshow or animation export.
-
#transition_time=(trans_time) ⇒ Object
rw
The transition_time= method is used to set the transition time.
-
#use_axes=(pagesettings) ⇒ Object
rw
The use_axes= method sets the page’s axes property.
-
#use_axes? ⇒ Boolean
rw
The use_axes? method determines whether you are storing the axes property with the page.
-
#use_camera=(setting) ⇒ Object
rw
The use_camera= method sets the page’s camera property.
-
#use_camera? ⇒ Boolean
rw
The use_camera? method determines whether you are storing the camera property with the page.
-
#use_environment=(use_environment) ⇒ Boolean
rw
The #use_environment= method is used to set if the
Environmentsettings are used in the scene. -
#use_environment? ⇒ Boolean
rw
The #use_environment? method is used to determine if the
Environmentsettings are used in the scene. -
#use_hidden=(setting) ⇒ Object
rw
deprecated
Deprecated.
The functionality is replaced by #use_hidden_geometry= and #use_hidden_objects= in SketchUp 2020.1.
-
#use_hidden? ⇒ Boolean
rw
deprecated
Deprecated.
The functionality is replaced by #use_hidden_geometry? and #use_hidden_objects? in SketchUp 2020.1.
-
#use_hidden_geometry=(setting)
rw
Sets the page’s use hidden geometry property.
-
#use_hidden_geometry? ⇒ Boolean
rw
Returns the use hidden geometry property from the page.
-
#use_hidden_layers=(setting) ⇒ Object
rw
The use_hidden_layers= method sets the page’s hidden layers property.
-
#use_hidden_layers? ⇒ Boolean
rw
The use_hidden_layers? method determines whether you are storing the hidden layers property with the page.
-
#use_hidden_objects=(setting)
rw
Sets the page’s use hidden objects property.
-
#use_hidden_objects? ⇒ Boolean
rw
Returns the use hidden objects property from the page.
-
#use_rendering_options=(setting) ⇒ Object
rw
The use_rendering_optoins= method sets the page’s display settings property.
-
#use_rendering_options? ⇒ Boolean
rw
The use_rendering_options? method determines whether you are storing the rendering options property with the page.
-
#use_section_planes=(setting) ⇒ Object
rw
The use_section_planes= method sets the page’s section planes property.
-
#use_section_planes? ⇒ Boolean
rw
The use_section_planes? method determines whether you are storing the section planes property with the page.
-
#use_shadow_info=(setting) ⇒ Object
rw
The use_shadow_info= method sets the page’s shadow info property.
-
#use_shadow_info? ⇒ Boolean
rw
The use_shadow_info? method determines whether you are storing the shadow info property with the page.
-
#use_style=(style) ⇒ Object
rw
The use_style= method sets the style to be used by the page.
-
#use_style? ⇒ Boolean
rw
The use_style? method determines whether storing a style with the page.
Entity - Inherited
Instance Method Summary
-
#active_section_planes ⇒ Array<Sketchup::SectionPlane>?
The #active_section_planes method is used to retrieve the active section plane for the
Page. -
#axes ⇒ Sketchup::Axes
The axes method returns the drawing axes for the page.
-
#camera ⇒ Sketchup::Camera
The #camera method retrieves the camera for a particular page.
-
#get_drawingelement_visibility(element) ⇒ Boolean
The #get_drawingelement_visibility method is used to get the visibility of a drawing element on a particular page.
-
#hidden_entities ⇒ Array<Sketchup::Drawingelement>
The hidden_entities method retrieves all hidden entities within a page.
-
#label ⇒ Object
The label method retrieves the label for a page from the page tab.
-
#layer_folders ⇒ Array<Sketchup::LayerFolder>?
The #layer_folders method retrieves the hidden layer folders associated with a page.
-
#layers ⇒ Array<Sketchup::Layer>?
The #layers method retrieves layers that don’t use their default visibility on this page.
-
#rendering_options ⇒ Sketchup::RenderingOptions
The rendering_options method retrieves a
RenderingOptionsobject for the page. -
#set_drawingelement_visibility(element, visibility) ⇒ Boolean
The #set_drawingelement_visibility method is used to change the visibility of a drawing element on a particular page.
-
#set_visibility(layer, visible_for_page) ⇒ Sketchup::Page
The #set_visibility method sets the visibility for a layer or layer folder on a page.
-
#shadow_info ⇒ Sketchup::ShadowInfo
The #shadow_info method retrieves the
ShadowInfoobject for the page. -
#style ⇒ Object
The style method retrieves the style associated with the page.
-
#update(flags) ⇒ Boolean
The #update method performs an update on the page properties based on the current view that the user has.
Entity - Inherited
| #add_observer | The add_observer method is used to add an observer to the current object. |
| #attribute_dictionaries | The attribute_dictionaries method is used to retrieve the |
| #attribute_dictionary | The attribute_dictionary method is used to retrieve an attribute dictionary with a given name that is attached to an |
| #delete_attribute | The |
| #entityID | The entityID method is used to retrieve a unique ID assigned to an entity. |
| #get_attribute | The |
| #inspect | The |
| #model | The model method is used to retrieve the model for the entity. |
| #parent | The parent method is used to retrieve the parent of the entity. |
| #persistent_id | The |
| #remove_observer | The remove_observer method is used to remove an observer from the current object. |
| #set_attribute | The set attribute is used to set the value of an attribute in an attribute dictionary with the given name. |
| #to_s | The |
| #typename | The typename method retrieves the type of the entity, which will be a string such as “Face”, “Edge”, or “Group”. |
Instance Attribute Details
#delay_time ⇒ Object (rw)
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.
#delay_time=(seconds) ⇒ Object (rw)
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.
#description ⇒ Object (rw)
The description method retrieves the description for a page as found in the Scenes manager dialog.
#description=(description) ⇒ Object (rw)
The description method sets the description for a page as found in the Scenes manager dialog.
#environment ⇒ Sketchup::Environment (rw)
The #environment method is used to retrieve the Environment for the scene.
#environment=(environment) ⇒ Sketchup::Environment (rw)
The #environment= method is used to set the Environment for the scene.
#include_in_animation=(include) ⇒ Page (rw)
The #include_in_animation= method controls whether the page should be included when exporting an animation from the model.
#include_in_animation? ⇒ Boolean (rw)
The #include_in_animation? method determines whether the page should be included when exporting an animation from the model.
#name ⇒ Object (rw)
The name method retrieves the name for a page from the page tab.
#name=(name) ⇒ Object (rw)
The #name= method sets the name for a page’s tab. If the name is already used by another page, a unique name is created.
#transition_time ⇒ Object (rw)
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.
#transition_time=(trans_time) ⇒ Object (rw)
The transition_time= method is used to set the transition time.
#use_axes=(pagesettings) ⇒ Object (rw)
The use_axes= method sets the page’s axes property.
#use_axes? ⇒ Boolean (rw)
The use_axes? method determines whether you are storing the axes property with the page.
#use_camera=(setting) ⇒ Object (rw)
The use_camera= method sets the page’s camera property.
#use_camera? ⇒ Boolean (rw)
The use_camera? method determines whether you are storing the camera property with the page.
#use_environment=(use_environment) ⇒ Boolean (rw)
The #use_environment= method is used to set if the Environment settings are used in the scene.
#use_environment? ⇒ Boolean (rw)
The #use_environment? method is used to determine if the Environment settings are used in the scene.
#use_rendering_options=(setting) ⇒ Object (rw)
The use_rendering_optoins= method sets the page’s display settings property.
#use_rendering_options? ⇒ Boolean (rw)
The use_rendering_options? method determines whether you are storing the rendering options property with the page.
#use_section_planes=(setting) ⇒ Object (rw)
The use_section_planes= method sets the page’s section planes property.
#use_section_planes? ⇒ Boolean (rw)
The use_section_planes? method determines whether you are storing the section planes property with the page.
#use_shadow_info=(setting) ⇒ Object (rw)
The use_shadow_info= method sets the page’s shadow info property.
#use_shadow_info? ⇒ Boolean (rw)
The use_shadow_info? method determines whether you are storing the shadow info property with the page.
#use_style=(style) ⇒ Object (rw)
The use_style= method sets the style to be used by the page.
#use_style? ⇒ Boolean (rw)
The use_style? method determines whether storing a style with the page.
Instance Method Details
#active_section_planes ⇒ Array<Sketchup::SectionPlane>?
The #active_section_planes method is used to retrieve the active section plane for the Page.
#axes ⇒ Sketchup::Axes
The axes method returns the drawing axes for the page.
Since SketchUp 2026.0, modifying the axes of a scene is an undoable operation.
#camera ⇒ Sketchup::Camera
The #camera method retrieves the camera for a particular page.
Since SketchUp 2026.0, modifying the camera properties of a scene is an undoable operation.
#get_drawingelement_visibility(element) ⇒ Boolean
The #get_drawingelement_visibility method is used to get the visibility of a drawing element on a particular page.
#label ⇒ Object
The label method retrieves the label for a page from the page tab.
#layer_folders ⇒ Array<Sketchup::LayerFolder>?
The #layer_folders method retrieves the hidden layer folders associated with a page.
#layers ⇒ Array<Sketchup::Layer>?
The #layers method retrieves layers that don’t use their default visibility on this page.
#rendering_options ⇒ Sketchup::RenderingOptions
The rendering_options method retrieves a RenderingOptions object for the page.
Since SketchUp 2026.0, modifying rendering_options of a scene is an undoable operation.
#set_drawingelement_visibility(element, visibility) ⇒ Boolean
The #set_drawingelement_visibility method is used to change the visibility of a drawing element on a particular page. Only drawing elements on the root of the model, as well as nested instances of components, groups, and images are controlled by Page visibility.
#set_visibility(layer, visible_for_page) ⇒ Page
#set_visibility(layer_folder, visible_for_page) ⇒ Page
Page
#set_visibility(layer_folder, visible_for_page) ⇒ Page
The #set_visibility method sets the visibility for a layer or layer folder on a page.
#shadow_info ⇒ Sketchup::ShadowInfo
While certain shadow settings, such as those available in the Shadows panel, can be controlled on a per-page basis, global settings like north angle, latitude, and longitude are managed at the model level and are not page-specific.
The #shadow_info method retrieves the ShadowInfo object for the page.
Since SketchUp 2026.0, modifying shadow_info of a scene is an undoable operation.
#style ⇒ Object
The style method retrieves the style associated with the page.
#update(flags) ⇒ Boolean
The #update method performs an update on the page properties based on the current view that the user has. What properties of the Page get updated are controlled via an integer whose bits corresponds to different properties. These flags can be used individually or combined using bitwise OR.
PAGE_USE_CAMERA # Camera Location
PAGE_USE_RENDERING_OPTIONS # Drawing Style
PAGE_USE_SHADOWINFO # Shadow Setting
PAGE_USE_SKETCHCS # Axes Location
PAGE_USE_HIDDEN # Hidden Geometry & Objects (Up 2019 and older)
PAGE_USE_HIDDEN_GEOMETRY # Hidden Geometry (SU 2020 and later)
PAGE_USE_HIDDEN_OBJECTS # Hidden Objects (SU 2020 and later)
PAGE_USE_LAYER_VISIBILITY # Visible Layers
PAGE_USE_SECTION_PLANES # Active Section Planes
PAGE_USE_ALL # All possible scene properties
PAGE_USE_ENVIRONMENT # Environment settings