Style

SketchUp 6.0+

class

Parent: Object

Introduction

The Style class contains methods for modifying information about a specific style. Styles are a collection of display settings that tell SketchUp how to draw the model.

     # Get a handle to the styles collection.
     styles = Sketchup.active_model.styles

     # Display the name of the first style.
     first_style = styles[0]
     UI.messagebox("Your first style is named " + first_style.name.to_s)

Methods

Style.descriptionSketchUp 6.0+

The description method is used to retrieve the description for a style.

Returns:

description
the description for the style.
 style = Sketchup.active_model.styles[0]
 UI.messagebox("Your first style description is: " +
               style.description.to_s)

Style.description=SketchUp 6.0+

The description= method is used to set a description for a style.

Arguments:

description
A textual description of the style.

Returns:

status
true if successful, false if unsuccessful.
style = Sketchup.active_model.styles[0]
style.description = "My new style description."
UI.messagebox('My new style description is: ' + style.description)

Style.nameSketchUp 6.0+

The name method is used to retrieve the name for a style.

Returns:

name
the name for the style.
 name = style.name

Style.name=SketchUp 6.0+

The name= method is used to set the name for a style.

Arguments:

name
- the new name for the style.

Returns:

name
the name that was set.
style = Sketchup.active_model.styles[0]
style.name = 'My Very Own Style'
UI.messagebox('My new style name is: ' + style.name)

  

Trimble Home
About Trimble - Privacy Policy - Contact Us