Class: Sketchup::HatchPatterns
Overview
An HatchPatterns object is a collection of HatchPattern objects. It is used to manage the hatch patterns in a model.
An HatchPattern object represents an hatch pattern in the model.
Instance Method Summary # collapse
-
#[](index_or_name) ⇒ Object
The #[] method is used to retrieve an HatchPattern by index or name.
-
#add(name, path) ⇒ Sketchup::HatchPattern
The #add method adds an HatchPattern to the HatchPatterns, loading it from a file.
-
#each {|hatch_pattern| ... } ⇒ Sketchup::HatchPatterns
The #each method is used to iterate over all the patterns in the HatchPatterns.
-
#purge_unused ⇒ Sketchup::HatchPatterns
The #purge_unused method is used to remove unused hatch patterns.
-
#remove(pattern) ⇒ Boolean
The #remove method removes an HatchPattern from the HatchPatterns.
-
#selected_hatch_pattern ⇒ Sketchup::HatchPattern?
The #selected_hatch_pattern method retrieves the currently selected HatchPattern, mirroring the selection in the desktop UI, or
nilif none is selected. -
#selected_hatch_pattern=(pattern) ⇒ Object
The #selected_hatch_pattern= method sets the currently selected HatchPattern, mirroring the selection in the desktop UI.
-
#size ⇒ Integer
(also: #length)
The #size method retrieves the number of hatch patterns in the HatchPatterns.
Methods inherited from Entity
#add_observer, #attribute_dictionaries, #attribute_dictionary, #delete_attribute, #deleted?, #entityID, #get_attribute, #inspect, #model, #parent, #persistent_id, #remove_observer, #set_attribute, #to_s, #typename, #valid?
Instance Method Details
↑ #[](index) ⇒ Sketchup::HatchPattern? #[](name) ⇒ Sketchup::HatchPattern?
The #[] method is used to retrieve an Sketchup::HatchPattern by index or name.
↑ #add(name, path) ⇒ Sketchup::HatchPattern
The #add method adds an Sketchup::HatchPattern to the Sketchup::HatchPatterns, loading it from a file. The name must be non-empty and unique within the model.
↑ #each {|hatch_pattern| ... } ⇒ Sketchup::HatchPatterns
The #each method is used to iterate over all the patterns in the Sketchup::HatchPatterns.
↑ #purge_unused ⇒ Sketchup::HatchPatterns
The #purge_unused method is used to remove unused hatch patterns.
↑ #remove(pattern) ⇒ Boolean
The #remove method removes an Sketchup::HatchPattern from the Sketchup::HatchPatterns.
↑ #selected_hatch_pattern ⇒ Sketchup::HatchPattern?
The #selected_hatch_pattern method retrieves the currently selected Sketchup::HatchPattern, mirroring the selection in the desktop UI, or nil if none is selected.
↑ #selected_hatch_pattern=(pattern) ⇒ Object
The #selected_hatch_pattern= method sets the currently selected Sketchup::HatchPattern, mirroring the selection in the desktop UI. Pass nil to clear the selection.
↑ #size ⇒ Integer Also known as: length
The #size method retrieves the number of hatch patterns in the Sketchup::HatchPatterns.