Class: Sketchup::Model
Overview
This is the access point for many common Sketchup objects
Constant Summary collapse
- VERSION_3 =
Sketchup::Model.constants.each { |n| puts "#n = #const_get(n)" }
3
- VERSION_4 =
4
- VERSION_5 =
5
- VERSION_6 =
6
- VERSION_7 =
7
- VERSION_8 =
8
- VERSION_2013 =
9
- VERSION_2014 =
10
- VERSION_2015 =
11
Instance Method Summary collapse
-
#abort_operation ⇒ Object
end.
- #active_entities ⇒ Sketchup::Entities
- #active_layer ⇒ Sketchup::Layer
- #active_layer=(layer) ⇒ Object
- #active_path ⇒ Object
- #active_view ⇒ View
- #add_note ⇒ Object
- #add_observer ⇒ Object
- #attribute_dictionaries ⇒ Object
- #attribute_dictionary ⇒ Object
- #behavior ⇒ Object
- #bounds ⇒ BoundingBox
- #classifications ⇒ Object
- #close(ignore_changes = false) ⇒ Object
- #close_active ⇒ Object
- #commit_operation ⇒ Object
- #definitions ⇒ DefinitionList
- #description ⇒ Object
- #description= ⇒ Object
- #edit_transform ⇒ Object
-
#entities ⇒ Entities
Returns a reference to the active_model's top-level entities collection.
- #export ⇒ Object
-
#find_entity_by_id(id_list_or_array) ⇒ Object
Finds and returns entities by their entityID or GUID.
- #get_attribute ⇒ Object
- #get_datum ⇒ Object
- #get_product_family ⇒ Object
- #guid ⇒ Object
- #import ⇒ Object
- #latlong_to_point ⇒ Object
- #layers ⇒ Layers
- #list_datums ⇒ Object
- #materials ⇒ Materials
- #mipmapping= ⇒ Object
- #mipmapping? ⇒ Boolean
- #modified? ⇒ Boolean
-
#name ⇒ String
The model name, or "" if model as not been saved.
- #name= ⇒ Object
- #options ⇒ Object
-
#pages ⇒ Object
A reference to the model's Pages (Scenes) collection.
- #path ⇒ Object
- #place_component ⇒ Object
- #point_to_latlong ⇒ Object
- #point_to_utm ⇒ Object
- #raytest ⇒ Object
- #remove_observer ⇒ Object
- #rendering_options ⇒ RenderingOptions
- #save ⇒ Object
- #save_copy ⇒ Object
- #save_thumbnail ⇒ Object
- #select_tool ⇒ Object
-
#selection ⇒ Object
A collection of selected Entity objects.
- #set_attribute ⇒ Object
- #set_datum ⇒ Object
-
#shadow_info ⇒ ShadowInfo
Object.
-
#start_operation(op_name, disable_ui = false, next_transparent = false, previous_transparent = false) ⇒ bool
The start_operation method is used to notify Edit > Undo that a new operation (which can be undone) is starting.
- #styles ⇒ Object
- #tags ⇒ Object
- #tags= ⇒ Object
-
#title ⇒ String
The name of the model.
- #tools ⇒ Object
- #utm_to_point ⇒ Object
- #valid? ⇒ Boolean
Instance Method Details
#active_path ⇒ Object
52 53 |
# File 'lib/model.rb', line 52 def active_path end |
#add_note ⇒ Object
58 59 |
# File 'lib/model.rb', line 58 def add_note end |
#add_observer ⇒ Object
60 61 |
# File 'lib/model.rb', line 60 def add_observer end |
#attribute_dictionaries ⇒ Object
62 63 |
# File 'lib/model.rb', line 62 def attribute_dictionaries end |
#attribute_dictionary ⇒ Object
64 65 |
# File 'lib/model.rb', line 64 def attribute_dictionary end |
#behavior ⇒ Object
66 67 |
# File 'lib/model.rb', line 66 def behavior end |
#bounds ⇒ BoundingBox
70 71 |
# File 'lib/model.rb', line 70 def bounds end |
#classifications ⇒ Object
73 74 |
# File 'lib/model.rb', line 73 def classifications end |
#close(ignore_changes = false) ⇒ Object
77 78 79 |
# File 'lib/model.rb', line 77 def close(ignore_changes = false) nil end |
#close_active ⇒ Object
81 82 |
# File 'lib/model.rb', line 81 def close_active end |
#commit_operation ⇒ Object
83 84 |
# File 'lib/model.rb', line 83 def commit_operation end |
#description ⇒ Object
89 90 |
# File 'lib/model.rb', line 89 def description end |
#description= ⇒ Object
91 92 |
# File 'lib/model.rb', line 91 def description= end |
#edit_transform ⇒ Object
93 94 |
# File 'lib/model.rb', line 93 def edit_transform end |
#entities ⇒ Entities
Returns a reference to the active_model's top-level entities collection.
99 100 101 |
# File 'lib/model.rb', line 99 def entities @entities end |
#export ⇒ Object
Exporting a model actually saves a copy of the model,
and subsequently triggers the onSaveModel
method of any [ModelObserver]
PDF export ability added in SketchUp 2016
111 112 |
# File 'lib/model.rb', line 111 def export end |
#find_entity_by_id(id_list_or_array) ⇒ Object
Finds and returns entities by their entityID or GUID.
115 116 |
# File 'lib/model.rb', line 115 def find_entity_by_id(id_list_or_array) end |
#get_datum ⇒ Object
122 123 |
# File 'lib/model.rb', line 122 def get_datum end |
#get_product_family ⇒ Object
124 125 |
# File 'lib/model.rb', line 124 def get_product_family end |
#guid ⇒ Object
126 127 |
# File 'lib/model.rb', line 126 def guid end |
#import ⇒ Object
128 129 |
# File 'lib/model.rb', line 128 def import end |
#latlong_to_point ⇒ Object
130 131 |
# File 'lib/model.rb', line 130 def latlong_to_point end |
#list_datums ⇒ Object
138 139 |
# File 'lib/model.rb', line 138 def list_datums end |
#mipmapping= ⇒ Object
146 147 |
# File 'lib/model.rb', line 146 def mipmapping= end |
#mipmapping? ⇒ Boolean
148 149 |
# File 'lib/model.rb', line 148 def mipmapping? end |
#modified? ⇒ Boolean
150 151 |
# File 'lib/model.rb', line 150 def modified? end |
#name ⇒ String
The model name, or "" if model as not been saved.
155 156 |
# File 'lib/model.rb', line 155 def name end |
#name= ⇒ Object
158 159 |
# File 'lib/model.rb', line 158 def name= end |
#options ⇒ Object
160 161 162 |
# File 'lib/model.rb', line 160 def @options end |
#pages ⇒ Object
Returns a reference to the model's Pages (Scenes) collection.
165 166 167 |
# File 'lib/model.rb', line 165 def pages @pages end |
#path ⇒ Object
169 170 |
# File 'lib/model.rb', line 169 def path end |
#place_component ⇒ Object
171 172 |
# File 'lib/model.rb', line 171 def place_component end |
#point_to_latlong ⇒ Object
173 174 |
# File 'lib/model.rb', line 173 def point_to_latlong end |
#point_to_utm ⇒ Object
175 176 |
# File 'lib/model.rb', line 175 def point_to_utm end |
#raytest ⇒ Object
177 178 |
# File 'lib/model.rb', line 177 def raytest end |
#remove_observer ⇒ Object
179 180 |
# File 'lib/model.rb', line 179 def remove_observer end |
#save ⇒ Object
185 186 |
# File 'lib/model.rb', line 185 def save end |
#save_thumbnail ⇒ Object
192 193 |
# File 'lib/model.rb', line 192 def save_thumbnail end |
#select_tool ⇒ Object
194 195 |
# File 'lib/model.rb', line 194 def select_tool end |
#selection ⇒ Object
Returns a collection of selected Entity objects.
198 199 200 |
# File 'lib/model.rb', line 198 def selection @selection end |
#set_datum ⇒ Object
206 207 |
# File 'lib/model.rb', line 206 def set_datum end |
#shadow_info ⇒ ShadowInfo
Returns object.
210 211 |
# File 'lib/model.rb', line 210 def shadow_info end |
#start_operation(op_name) ⇒ bool #start_operation(op_name[,disable_ui, transparent, prev_trans]) ⇒ bool
The start_operation method is used to notify Edit > Undo that a new operation (which can be undone) is starting.
227 228 |
# File 'lib/model.rb', line 227 def start_operation(op_name, disable_ui = false, next_transparent = false, previous_transparent = false) end |
#styles ⇒ Object
230 231 |
# File 'lib/model.rb', line 230 def styles end |
#tags ⇒ Object
232 233 |
# File 'lib/model.rb', line 232 def end |
#tags= ⇒ Object
234 235 |
# File 'lib/model.rb', line 234 def end |
#tools ⇒ Object
242 243 |
# File 'lib/model.rb', line 242 def tools end |
#utm_to_point ⇒ Object
244 245 |
# File 'lib/model.rb', line 244 def utm_to_point end |
#valid? ⇒ Boolean
246 247 |
# File 'lib/model.rb', line 246 def valid? end |