class Page |
Parent: Entity |
|
Methods:camera, delay_time, delay_time=, description, description=, hidden_entities, label, layers, name, name=, rendering_options, set_visibility, shadow_info, transition_time, transition_time=, update, use_axes=, use_axes?, use_camera=, use_camera?, use_hidden=, use_hidden?, use_hidden_layers=, use_hidden_layers?, use_rendering_options=, use_rendering_options?, use_section_planes=, use_section_planes?, use_shadow_info=, use_shadow_info? |
|
Sample Code: pagetests.rb |
|
Instance Methods |
camera |
The camera method retrieves the camera for a particular page. |
Syntax: |
camera = page.camera |
Arguments: |
|
Return Value: |
camera – a Camera object if successful, nil if the page does not save camera information |
Comments: |
|
Example: |
model = Sketchup.active_model |
delay_time |
The delay_time method retrieves the amount of time, in seconds, that a page will be displayed (before transition to another page). |
Syntax: |
time = page.delay_time |
Arguments: |
|
Return Value: |
time – the number of seconds of delay |
Comments: |
The delay can be modified in the Model Info > Tourguide panel of the SketchUp User Interface. If this method returns –1, the default delay time of 3.5 seconds is used. |
Example: |
model = Sketchup.active_model |
delay_time= |
The delay_time= method sets the amount of time, in seconds, that a page will be displayed (before transitioning to another page). |
Syntax: |
time = page.delay_time=seconds |
Arguments: |
seconds – the number of seconds to set as the delay time. |
Return Value: |
time – the number of seconds of delay |
Comments: |
The delay can be modified in the Model Info > Tourguide panel of the SketchUp User Interface. |
Example: |
model = Sketchup.active_model |
description |
The description method retrieves the description for a page as found in the Window > Pages manager. |
Syntax: |
description = page.description |
Arguments: |
|
Return Value: |
description – a textual description for the page. |
Comments: |
|
Example: |
model = Sketchup.active_model |
description= |
The description method sets the description for a page as found in the Window > Pages manager. |
Syntax: |
description = page.description “description” |
Arguments: |
description – a string description for the page |
Return Value: |
description – the new string description for the page |
Comments: |
|
Example: |
model = Sketchup.active_model |
hidden_entities |
The hidden_entities method retrieves all hidden entities within a page. |
Syntax: |
entities = page.hidden_entities |
Arguments: |
|
Return Value: |
entities – an Entities object containing hidden entities on the page. |
Comments: |
|
Example: |
model = Sketchup.active_model |
label |
The label method retrieves the label for a page from the page tab. |
Syntax: |
label = page.label |
Arguments: |
|
Return Value: |
label – a string label for the page tab |
Comments: |
|
Example: |
model = Sketchup.active_model |
layers |
The layers method retrieves the layers associated with a page. |
Syntax: |
layers = page.layers |
Arguments: |
|
Return Value: |
layers = a Layers object with zero or more layers. |
Comments: |
|
Example: |
model = Sketchup.active_model |
name |
The name method retrieves the name for a page from the page tab. |
Syntax: |
name = page.name |
Arguments: |
|
Return Value: |
label – a string name for the page tab |
Comments: |
|
Example: |
model = Sketchup.active_model |
name= |
The name= method sets the name for a page’s tab |
Syntax: |
name = page.name=”name” |
Arguments: |
“name” – the name of the page to be set |
Return Value: |
name – the name that you have set |
Comments: |
|
Example: |
model = Sketchup.active_model # We change the page name below |
rendering_options |
The rendering_options method retrieves a RenderingOptions object for the page. |
Syntax: |
renderingoptions = page.rendering_options |
Arguments: |
|
Return Value: |
renderingoptions – a RenderingOptions object |
Comments: |
|
Example: |
model = Sketchup.active_model |
set_visibility |
The set_visibility method sets the visibility for a layer on a page. |
Syntax: |
page = page.set_visibility layer visibility |
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. |
Return Value: |
page – the page whose visibility was set. |
Comments: |
|
Example: |
model = Sketchup.active_model |
shadow_info |
The shadow_info method retrieves the ShadowInfo object for the page. |
Syntax: |
shadowinfo = page.shadow_info |
Arguments: |
|
Return Value: |
shadowinfo - a ShadowInfo object if successful, nil if the page does not save shadow information |
Comments: |
|
Example: |
model = Sketchup.active_model |
transition_time |
|
Syntax: |
transitiontime = page.transition_time |
Arguments: |
|
Return Value: |
transitiontime - the amount of time it takes to transition to this page during a slideshow or animation export. |
Comments: |
The default transition time is used if this value is equal to -1. |
Example: |
model = Sketchup.active_model |
transition_time= |
The transition_time= method is used to set the transition time. |
Syntax: |
transitiontime = page.transition_time = transitiontime |
Arguments: |
transitiontime - the transition time in seconds |
Return Value: |
transitiontime - the new transition time |
Comments: |
|
Example: |
model = Sketchup.active_model |
update |
The update method performs an update on the page properties |
Syntax: |
status = page.update |
Arguments: |
|
Return Value: |
status - true if successful, false if unsuccessful |
Comments: |
|
Example: |
model = Sketchup.active_model |
use_axes= |
The use_axes= method sets the page to store the axes property. |
Syntax: |
status = page.use_axes = pagesetting |
Arguments: |
pagesetting - true if you want your page to save this property, false if you do not want your page to save this property. |
Return Value: |
status - true if you are saving the property, false if you are not saving the property. |
Comments: |
|
Example: |
model = Sketchup.active_model |
use_axes? |
The use_axes? method determines whether you are storing the axes property with the page. |
Syntax: |
status = page.use_axes? |
Arguments: |
|
Return Value: |
status - true if you are storing the this property with the page, false if you are not storing this property with the page. |
Comments: |
|
Example: |
model = Sketchup.active_model |
use_camera= |
The use_camera= method sets the page to store the camera property. |
Syntax: |
status = page.use_camera = setting |
Arguments: |
setting - true if you want your page to save this property, false if you do not want your page to save this property. |
Return Value: |
status - true if you are saving the property, false if you are not saving the property. |
Comments: |
|
Example: |
model = Sketchup.active_model |
use_camera? |
The use_camera? method determines whether you are storing the camera property with the page. |
Syntax: |
status = page.use_camera? |
Arguments: |
|
Return Value: |
status - true if you are storing the this property with the page, false if you are not storing this property with the page. |
Comments: |
|
Example: |
model = Sketchup.active_model |
use_hidden= |
The use_hidden= method sets the page to store the hidden property. |
Syntax: |
status = page.use_hidden = setting |
Arguments: |
setting - true if you want your page to save this property, false if you do not want your page to save this property. |
Return Value: |
status - true if you are saving the property, false if you are not saving the property. |
Comments: |
|
Example: |
model = Sketchup.active_model |
use_hidden? |
The use_hidden? method determines whether you are storing the hidden property with the page. |
Syntax: |
status = page.use_hidden? |
Arguments: |
|
Return Value: |
status - true if you are storing the this property with the page, false if you are not storing this property with the page. |
Comments: |
|
Example: |
model = Sketchup.active_model |
use_hidden_layers= |
The use_hidden_layers= method sets the page to store the hidden layers property. |
Syntax: |
status = page.use_hidden_layers = setting |
Arguments: |
setting - true if you want your page to save this property, false if you do not want your page to save this property. |
Return Value: |
status - true if you are saving the property, false if you are not saving the property. |
Comments: |
|
Example: |
model = Sketchup.active_model |
use_hidden_layers? |
The use_hidden_layers? method determines whether you are storing the hidden layers property with the page. |
Syntax: |
status = page.use_hidden_layers? |
Arguments: |
|
Return Value: |
status - true if you are storing the this property with the page, false if you are not storing this property with the page. |
Comments: |
|
Example: |
model = Sketchup.active_model |
use_rendering_options= |
The use_rendering_optoins= method sets the page to store the display settings property.
|
Syntax: |
status = page.use_rendering_optoins = setting |
Arguments: |
setting - true if you want your page to save this property, false if you do not want your page to save this property. |
Return Value: |
status - true if you are saving the property, false if you are not saving the property. |
Comments: |
|
Example: |
model = Sketchup.active_model |
use_rendering_options? |
The use_rendering_options? method determines whether you are storing the rendering options property with the page. |
Syntax: |
status = page.use_rendering_options? |
Arguments: |
|
Return Value: |
status - true if you are storing the this property with the page, false if you are not storing this property with the page. |
Comments: |
|
Example: |
model = Sketchup.active_model |
use_section_planes= |
The use_section_planes= method sets the page to store the section planes property. |
Syntax: |
status = page.use_section_planes = setting |
Arguments: |
setting - true if you want your page to save this property, false if you do not want your page to save this property. |
Return Value: |
status - true if you are saving the property, false if you are not saving the property. |
Comments: |
|
Example: |
model = Sketchup.active_model |
use_section_planes? |
The use_section_planes? method determines whether you are storing the section planes property with the page. |
Syntax: |
status = page.use_section_planes? |
Arguments: |
|
Return Value: |
status - true if you are storing the this property with the page, false if you are not storing this property with the page. |
Comments: |
|
Example: |
model = Sketchup.active_model |
use_shadow_info= |
The use_shadow_info= method sets the page to store the shadow info property. |
Syntax: |
status = page.use_shadow_info = setting |
Arguments: |
setting - true if you want your page to save this property, false if you do not want your page to save this property. |
Return Value: |
status - true if you are saving the property, false if you are not saving the property. |
Comments: |
|
Example: |
model = Sketchup.active_model |
use_shadow_info? |
The use_shadow_info? method determines whether you are storing the shadow info property with the page. |
Syntax: |
status = page.use_shadow_info? |
Arguments: |
|
Return Value: |
status - true if you are storing the this property with the page, false if you are not storing this property with the page. |
Comments: |
|
Example: |
model = Sketchup.active_model |