Class: Sketchup::AttributeDictionaries
Relationships | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
Entity
|
|
Instance Chain:
self,
Enumerable,
Entity
|
|
Inherits: |
Sketchup::Entity
|
Overview
The AttributeDictionaries class is a collection of all of the AttributeDictionary
objects that are attached to a given Entity
object.
The Entity class is a popular parent class in SketchUp, meaning you can attach AttributeDictionaries
to almost anything, from geometric items like edges and faces and components to more conceptual things like pages or materials.
You access this class not by performing an AttributeDictionaries
.new but by grabbing a handle from an existing entity.
Instance Attribute Summary
Entity
- Inherited
Instance Method Summary
-
#[](key) ⇒ Sketchup::AttributeDictionary
Get an
AttributeDictionary
by name. -
#count ⇒ Integer
The count method is inherited from the Enumerable mix-in module.
-
#delete(key_or_dict) ⇒ Sketchup::AttributeDictionaries
The delete method destroys a given
AttributeDictionary
. -
#each {|dictionary| ... } ⇒ Object
The #each method is used to iterate through all of the attributes dictionaries.
-
#length ⇒ Integer
The #length method returns the number of attribute dictionary objects in the collection.
- #size ⇒ Integer
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 Method Details
#[](key) ⇒ Sketchup::AttributeDictionary
Get an AttributeDictionary
by name. Returns nil if there is none with the given name.
#count ⇒ Integer
The count method is inherited from the Enumerable mix-in module.
#delete(key_or_dict) ⇒ AttributeDictionaries
The delete method destroys a given AttributeDictionary
. This AttributeDictionary
can be passed directly or identified by its string name.
In SketchUp 2018, special attribute dictionaries have been added. The name of these dictionaries are “SU_InstanceSet” and “SU_DefinitionSet”. The dictionaries cannot be deleted via ruby and an ArgumentError will be raised. The key/value pairs in the dictionary can be deleted safely.
object
#each {|dictionary| ... } ⇒ Object
The #each
method is used to iterate through all of the attributes dictionaries.
#length ⇒ Integer
The #length
method returns the number of attribute dictionary objects in the collection.
#size ⇒ Integer
The #size
method is an alias of #length.