Class: Layout::Entities
| Relationships | |
| Super Chains via Extension / Inclusion / Inheritance | |
| Instance Chain: 
          self,
          Enumerable
         | |
| Inherits: | Object | 
Overview
The Entities class is a container class for Entitys. A Entities object is different from a SketchUp::Entities object in that it is read-only. Adding or removing Entitys from a Document happens with the Document#add_entity and Document#remove_entity methods.
The Entities from AngularDimension#entities, Label#entities, LinearDimension#entities, or Table#entities contains the Entitys that represent the Entity in its exploded form.
The Entities from Group#entities contains all the Entitys that belong to the Group.
The Entities from Page#entities contains all of the Entitys on both shared and non-shared Layers. This class is used to iterate through the Entitys in draw order or pick order (reverse draw order) using the #each and #reverse_each methods.
The Entities from Document#shared_entities contains all of the Entitys that belong on all shared Layers.
The Entities from Page#nonshared_entities contains all of the Entitys that belong to that Page.
The Entities from LayerInstance#entities contains all of the Entitys that belong on that LayerInstance.
Instance Method Summary
- #[](index) ⇒ Layout::Entity
- #each(flags = {}) {|entity| ... }
- #length ⇒ Integer (also: #size)
- 
    
      #reverse_each {|entity| ... } 
    
    The #reverse_each method iterates through all of the Entitys in reverse order.
- 
    
      #size  
    
    Alias for #length. 
Instance Method Details
#[](index) ⇒ Layout::Entity
#each(flags = {}) {|entity| ... }
Don’t remove content from this collection while iterating over it with #each. This would change the size of the collection and cause elements to be skipped as the indices change. Instead copy the current collection to an array using to_a and then use each on the array, when removing content.
The #each method iterates through all of the Entitys. When iterating over a LayerInstance‘s Entities, it is not necessary to provide a flags Hash. When iterating over a Page’s Entities, the flags Hash is optional; providing no Hash will result in iterating over all Entitys, including those on hidden or locked Layers. Valid symbols for the Hash are :skip_hidden and :skip_locked.
    #length  ⇒ Integer 
    Also known as: #size
  
The #length method returns the number of Entitys.
    
      #reverse_each {|entity| ... } 
      #reverse_each(flags) {|entity| ... } 
    
  
The #reverse_each method iterates through all of the Entitys in reverse order. When iterating over a LayerInstance‘s Entities, it is not necessary to provide a flags Hash. When iterating over a Page’s Entities, the flags Hash is optional; providing no Hash will result in iterating over all Entitys, including those on hidden or locked Layers. Valid symbols for the Hash are :skip_hidden and :skip_locked.
#size
Alias for #length.