Class: Sketchup::Model

Inherits:
Object show all
Defined in:
lib/model.rb

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

Instance Method Details

#abort_operation ⇒ Object

end



37
38
# File 'lib/model.rb', line 37

def abort_operation
end

#active_entities ⇒ Sketchup::Entities

Returns:



41
42
# File 'lib/model.rb', line 41

def active_entities
end

#active_layer ⇒ Sketchup::Layer

Returns:



45
46
# File 'lib/model.rb', line 45

def active_layer
end

#active_layer=(layer) ⇒ Object

Parameters:



49
50
# File 'lib/model.rb', line 49

def active_layer=(layer)
end

#active_path ⇒ Object



52
53
# File 'lib/model.rb', line 52

def active_path
end

#active_view ⇒ View

Returns:



56
57
# File 'lib/model.rb', line 56

def active_view
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

Returns:

  • (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

Since:

  • 2015



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

#definitions ⇒ DefinitionList

Returns:



87
88
# File 'lib/model.rb', line 87

def definitions
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.

Returns:

See Also:



99
100
101
# File 'lib/model.rb', line 99

def entities
    @entities
end

#export ⇒ Object

Note:

Exporting a model actually saves a copy of the model, and subsequently triggers the onSaveModel method of any [ModelObserver]

Note:

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_attribute ⇒ Object

See Also:



119
120
# File 'lib/model.rb', line 119

def get_attribute
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

#layers ⇒ Layers

Returns:



134
135
136
# File 'lib/model.rb', line 134

def layers
    @layers
end

#list_datums ⇒ Object



138
139
# File 'lib/model.rb', line 138

def list_datums
end

#materials ⇒ Materials

Returns:



142
143
144
# File 'lib/model.rb', line 142

def materials
    @materials
end

#mipmapping= ⇒ Object



146
147
# File 'lib/model.rb', line 146

def mipmapping=
end

#mipmapping? ⇒ Boolean

Returns:

  • (Boolean)


148
149
# File 'lib/model.rb', line 148

def mipmapping?
end

#modified? ⇒ Boolean

Returns:

  • (Boolean)


150
151
# File 'lib/model.rb', line 150

def modified?
end

#name ⇒ String

The model name, or "" if model as not been saved.

Returns:



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
    @options
end

#pages ⇒ Object

Returns a reference to the model's Pages (Scenes) collection.

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

#rendering_options ⇒ RenderingOptions

Returns:



183
184
# File 'lib/model.rb', line 183

def rendering_options
end

#save ⇒ Object



185
186
# File 'lib/model.rb', line 185

def save
end

#save_copy ⇒ Object

Since:

  • SketchUp 2014



189
190
# File 'lib/model.rb', line 189

def save_copy
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.

Returns:

  • a collection of selected Entity objects



198
199
200
# File 'lib/model.rb', line 198

def selection
    @selection
end

#set_attribute ⇒ Object

See Also:



203
204
# File 'lib/model.rb', line 203

def set_attribute
end

#set_datum ⇒ Object



206
207
# File 'lib/model.rb', line 206

def set_datum
end

#shadow_info ⇒ ShadowInfo

Returns object.

Returns:



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.

Overloads:

  • #start_operation(op_name) ⇒ bool

    Parameters:

    • op_name (String) —

      the name which appears

    Since:

    • SketchUp 6.0

  • #start_operation(op_name[,disable_ui, transparent, prev_trans]) ⇒ bool

    Parameters:

    • op_name (String) —

      optional the name which appears

    • disable_ui (optional, true/false) —

      user interface changes are suppressed.

    • transparent (Boolean)
    • prev_trans (Boolean)

    Since:

    • SketchUp 7.0

Returns:

  • (bool) —

    true if successful, false if not.



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 tags
end

#tags= ⇒ Object



234
235
# File 'lib/model.rb', line 234

def tags=
end

#title ⇒ String

The name of the model

Returns:



239
240
# File 'lib/model.rb', line 239

def title
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

Returns:

  • (Boolean)


246
247
# File 'lib/model.rb', line 246

def valid?
end