Module: Sketchup

Defined in:
lib/sketchup.rb,
lib/hlr.rb,
lib/loop.rb,
lib/edge.rb,
lib/menu.rb,
lib/page.rb,
lib/text.rb,
lib/face.rb,
lib/view.rb,
lib/image.rb,
lib/pages.rb,
lib/model.rb,
lib/tools.rb,
lib/layer.rb,
lib/style.rb,
lib/color.rb,
lib/group.rb,
lib/curve.rb,
lib/camera.rb,
lib/layers.rb,
lib/styles.rb,
lib/entity.rb,
lib/vertex.rb,
lib/texture.rb,
lib/console.rb,
lib/edgeuse.rb,
lib/importer.rb,
lib/arccurve.rb,
lib/entities.rb,
lib/uvhelper.rb,
lib/behavior.rb,
lib/material.rb,
lib/selection.rb,
lib/dimension.rb,
lib/materials.rb,
lib/inputpoint.rb,
lib/pickhelper.rb,
lib/appobserver.rb,
lib/shadow_info.rb,
lib/sectionplane.rb,
lib/viewobserver.rb,
lib/pagesobserver.rb,
lib/modelobserver.rb,
lib/toolsobserver.rb,
lib/texturewriter.rb,
lib/layersobserver.rb,
lib/definitionlist.rb,
lib/entityobserver.rb,
lib/optionsmanager.rb,
lib/drawingelement.rb,
lib/optionsprovider.rb,
lib/entitiesobserver.rb,
lib/instanceobserver.rb,
lib/dimension_radial.rb,
lib/dimension_linear.rb,
lib/constructionline.rb,
lib/renderingoptions.rb,
lib/constructionpoint.rb,
lib/materialsobserver.rb,
lib/extensionsmanager.rb,
lib/componentinstance.rb,
lib/selectionobserver.rb,
lib/dimension_observer.rb,
lib/definitionobserver.rb,
lib/shadowinfoobserver.rb,
lib/definitionsobserver.rb,
lib/componentdefinition.rb,
lib/attributedictionary.rb,
lib/attributedictionaries.rb,
lib/optionsproviderobserver.rb,
lib/renderingoptionsobserver.rb

Overview

The Sketchup module namespace contains methods that might be considered “application” level methods. The “entry-point” to most plugins.

Defined Under Namespace

Classes: AppObserver, ArcCurve, AttributeDictionaries, AttributeDictionary, Behavior, Camera, Color, ComponentDefinition, ComponentInstance, Console, ConstructionLine, ConstructionPoint, Curve, DefinitionList, DefinitionObserver, DefinitionsObserver, Dimension, DimensionLinear, DimensionObserver, DimensionRadial, Drawingelement, Edge, EdgeUse, Entities, EntitiesObserver, Entity, EntityObserver, ExtensionsManager, Face, Group, HLR, Image, Importer, InputPoint, InstanceObserver, Layer, Layers, LayersObserver, Loop, Material, Materials, MaterialsObserver, Menu, Model, ModelObserver, OptionsManager, OptionsProvider, OptionsProviderObserver, Page, Pages, PagesObserver, PickHelper, RenderingOptions, RenderingOptionsObserver, SectionPlane, Selection, SelectionObserver, ShadowInfo, ShadowInfoObserver, Style, Styles, Text, Texture, TextureWriter, Tools, ToolsObserver, UVHelper, Vertex, View, ViewObserver

Class Method Summary (collapse)

Class Method Details

+ (Model) active_model

Note:

On Windows, there is only a single active model. Since the Mac version of SketchUp can have multiple models open, this returns the currently focused model.

The model!

Examples:

model = Sketchup.active_model

Returns:

  • (Model)

    the current active model.



18
19
20
21
22
# File 'lib/sketchup.rb', line 18

def self.active_model
  if @model.class != Sketchup::Model
    @model = Sketchup::Model.new
  end
end

+ (Object) add_observer(app_observer)

Attaches an AppObserver to the current SketchUp Application. You should retain a reference to the observer if you need to remove it at a later time.

Examples:

app_observer = AppObserver.new
status = Sketchup.add_observer(app_observer)

Parameters:

Returns:

  • status true if successful, false if not.

See Also:

  • #remove_observer


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

def self.add_observer(app_observer)
end

+ (Object) app_name



40
41
# File 'lib/sketchup.rb', line 40

def self.app_name
end

+ (Object) break_edges=



42
43
# File 'lib/sketchup.rb', line 42

def self.break_edges=
end

+ (Boolean) break_edges?

Returns:

  • (Boolean)


44
45
# File 'lib/sketchup.rb', line 44

def self.break_edges?
end

+ (Object) create_texture_writer



46
47
# File 'lib/sketchup.rb', line 46

def self.create_texture_writer
end

+ (Object) display_name_from_action



48
49
# File 'lib/sketchup.rb', line 48

def self.display_name_from_action
end

+ (ExtensionsManager) extensions



55
56
# File 'lib/sketchup.rb', line 55

def self.extensions
end

+ (Object) file_new



58
59
# File 'lib/sketchup.rb', line 58

def self.file_new
end

+ (Object) find_support_file



60
61
# File 'lib/sketchup.rb', line 60

def self.find_support_file
end

+ (Object) find_support_files



62
63
# File 'lib/sketchup.rb', line 62

def self.find_support_files
end

+ (Object) format_angle



64
65
# File 'lib/sketchup.rb', line 64

def self.format_angle
end

+ (Object) format_area



66
67
# File 'lib/sketchup.rb', line 66

def self.format_area
end

+ (Object) format_degrees



68
69
# File 'lib/sketchup.rb', line 68

def self.format_degrees
end

+ (Object) format_length



70
71
# File 'lib/sketchup.rb', line 70

def self.format_length
end

+ (Object) get_datfile_info



72
73
# File 'lib/sketchup.rb', line 72

def self.get_datfile_info
end

+ (Object) get_i18ndatfile_info



74
75
# File 'lib/sketchup.rb', line 74

def self.get_i18ndatfile_info
end

+ (Object) get_locale



76
77
# File 'lib/sketchup.rb', line 76

def self.get_locale
end

+ (Object) get_resource_path



78
79
# File 'lib/sketchup.rb', line 78

def self.get_resource_path
end

+ (Object) get_shortcuts



80
81
# File 'lib/sketchup.rb', line 80

def self.get_shortcuts
end

+ (ExtensionManager) install_from_archive(path)

Installs the contents of a ZIP archive file into SketchUp's Plugins folder. If the ZIP contains subfolders, these will be preserved.

Returns:

  • (ExtensionManager)

Since:

  • SketchUp 8.0 M2



85
86
87
# File 'lib/sketchup.rb', line 85

def self.install_from_archive(path)

end

+ (Object) is_online



89
90
# File 'lib/sketchup.rb', line 89

def self.is_online
end

+ (Boolean) is_pro?

Returns:

  • (Boolean)


91
92
# File 'lib/sketchup.rb', line 91

def self.is_pro?
end

+ (Boolean) is_valid_filename?

Returns:

  • (Boolean)


93
94
# File 'lib/sketchup.rb', line 93

def self.is_valid_filename?
end

+ (Boolean) load(file)

Loads both encrypted (.rbs) and non-encrypted Ruby files.

Examples:

status = Sketchup.load("C:/cool_plugins.rbs")

Parameters:

  • file (String)

    path to a file

Returns:

  • (Boolean)

    true if successful, otherwise false



102
103
# File 'lib/sketchup.rb', line 102

def self.load(file)
end

+ (Object) open_file



104
105
# File 'lib/sketchup.rb', line 104

def self.open_file
end

+ (Object) os_language



106
107
# File 'lib/sketchup.rb', line 106

def self.os_language
end

+ (Object) parse_length



108
109
# File 'lib/sketchup.rb', line 108

def self.parse_length
end

+ (Object) platform

Since:

  • SketchUp 2014



112
113
# File 'lib/sketchup.rb', line 112

def self.platform
end

+ (Object) plugins_disabled=(true_or_false)

Parameters:

  • true_or_false (Boolean)

    true or false

Since:

  • SketchUp 8.0 M2



117
118
# File 'lib/sketchup.rb', line 117

def self.plugins_disabled=(true_or_false)
end

+ (Boolean) plugins_disabled?

Returns:

  • (Boolean)

Since:

  • SketchUp 8.0 M2



120
121
# File 'lib/sketchup.rb', line 120

def self.plugins_disabled?
end

+ (Object) quit

Since:

  • SketchUp 2014



124
125
# File 'lib/sketchup.rb', line 124

def self.quit
end

+ (Object) read_default

See Also:



128
129
# File 'lib/sketchup.rb', line 128

def self.read_default
end

+ (Object) register_extension



131
132
# File 'lib/sketchup.rb', line 131

def self.register_extension
end

+ (Object) register_importer



134
135
# File 'lib/sketchup.rb', line 134

def self.register_importer
end

+ (Boolean) remove_observer(app_observer)

Removes an attached AppObserver

Examples:

status = Sketchup.remove_observer(app_observer)

Parameters:

  • app_observer (AppObserver)

    a reference to a AppObserver instance.

Returns:

  • (Boolean)

    status true if successful, false if not.



145
146
# File 'lib/sketchup.rb', line 145

def self.remove_observer(app_observer)
end

+ (Object) require



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

def self.require
end

+ (Object) save_thumbnail



151
152
# File 'lib/sketchup.rb', line 151

def self.save_thumbnail
end

+ (Object) send_action



154
155
# File 'lib/sketchup.rb', line 154

def self.send_action
end

+ (Boolean) set_status_text(text, position)

Display a message in SketchUp's Status Bar or VCB value or label.

Parameters:

  • text (String)

    the text to display in the staus bar.

  • position (optional)

    one of: SB_PROMPT SB_VCB_LABEL SB_VCB_VALUE

Returns:

  • (Boolean)

    true if successful, false if not.



164
165
# File 'lib/sketchup.rb', line 164

def self.set_status_text(text, position)
end

+ (Boolean) status_text=(text)

Returns true if successful, false if not.

Parameters:

  • text (String)

    the text to display in the staus bar.

Returns:

  • (Boolean)

    true if successful, false if not.

See Also:



170
171
# File 'lib/sketchup.rb', line 170

def self.status_text=(text)
end

+ (Object) temp_dir

Since:

  • SketchUp 2014



174
175
# File 'lib/sketchup.rb', line 174

def self.temp_dir
end

+ (Object) template



177
178
# File 'lib/sketchup.rb', line 177

def self.template
end

+ (Object) template=



179
180
# File 'lib/sketchup.rb', line 179

def self.template=
end

+ (Object) template_dir



181
182
# File 'lib/sketchup.rb', line 181

def self.template_dir
end

+ (Object) undo



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

def self.undo
end

+ (Object) vcb_label=(label)

Sets the label for the VCB, more recently known as the Measurements box.

Parameters:

  • label (String)

    the text label for the VCB



188
189
# File 'lib/sketchup.rb', line 188

def self.vcb_label=(label)
end

+ (Object) vcb_value=(str)

Sets the value of the VCB, aka the Measurements box.

Parameters:

  • str (String)

    the text to place in the VCB.



193
194
# File 'lib/sketchup.rb', line 193

def self.vcb_value=(str)
end

+ (Object) version



196
197
# File 'lib/sketchup.rb', line 196

def self.version
end

+ (Object) version_number



198
199
# File 'lib/sketchup.rb', line 198

def self.version_number
end

+ (Boolean) write_default(section, key, value)

Write a key-value pair to the specified section of the Registry. Persistent storage. Sections appear under HKCU\Software\Google\SketchUp(v) where v is the SketchUp major version.

Examples:

status = Sketchup.write_default("MyPluginConfig", "OffsetAmount", 3.5)

Parameters:

Returns:

  • (Boolean)

    true if success, false if not.

See Also:



211
212
# File 'lib/sketchup.rb', line 211

def self.write_default(section, key, value)
end