123456789_123456789_123456789_123456789_123456789_

Class: Sketchup::Style

Relationships
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, Entity
Instance Chain:
self, Entity
Inherits: Sketchup::Entity

Overview

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.

Examples:

styles = Sketchup.active_model.styles
puts "Your first style is named #{styles.first.name}"

Version:

  • SketchUp 6.0

Instance Attribute Summary

Entity - Inherited

#deleted?

The deleted? method is used to determine if your entity is still valid (not deleted by another script, for example.).

#valid?

The #valid? method is used to determine if your entity is still valid (not deleted by another script, for example).

Instance Method Summary

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 AttributeDictionaries collection attached to the entity.

#attribute_dictionary

The attribute_dictionary method is used to retrieve an attribute dictionary with a given name that is attached to an Entity.

#delete_attribute

The #delete_attribute method is used to delete an attribute from an entity.

#entityID

The entityID method is used to retrieve a unique ID assigned to an entity.

#get_attribute

The #get_attribute method is used to retrieve the value of an attribute in the entity’s attribute dictionary.

#inspect

The #inspect method is used to retrieve the string representation of the entity.

#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 #persistent_id method is used to retrieve a unique persistent id assigned to an entity.

#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 #to_s method is used to retrieve the string representation of the entity.

#typename

The typename method retrieves the type of the entity, which will be a string such as “Face”, “Edge”, or “Group”.

Instance Attribute Details

#descriptionString (rw)

The #description method gets the description for a Style.

Examples:

styles = Sketchup.active_model.styles
style = styles.first
puts "Your first style description is: #{style.description}"

Returns:

Version:

  • SketchUp 6.0

#description=(description) (rw)

The #description= method sets the description for a Style.

Examples:

styles = Sketchup.active_model.styles
style = styles.first
style.description = "My new style description."

Parameters:

Version:

  • SketchUp 6.0

#nameString (rw)

The #name method gets the name for a Style.

Examples:

styles = Sketchup.active_model.styles
style = styles.first
name = style.name

Version:

  • SketchUp 6.0

#name=(name) (rw)

The #name= method sets the name for a Style.

Examples:

styles = Sketchup.active_model.styles
style = styles.first
style.name = 'My Very Own Style'

Parameters:

Version:

  • SketchUp 6.0