sketchup-api-stubs 0.7.10 → 0.7.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/sketchup-api-stubs/sketchup.rb +6 -0
- data/lib/sketchup-api-stubs/stubs/Array.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Geom/BoundingBox.rb +2 -2
- data/lib/sketchup-api-stubs/stubs/Geom/Bounds2d.rb +25 -15
- data/lib/sketchup-api-stubs/stubs/Geom/LatLong.rb +17 -32
- data/lib/sketchup-api-stubs/stubs/Geom/OrientedBounds2d.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Geom/Point2d.rb +62 -39
- data/lib/sketchup-api-stubs/stubs/Geom/Point3d.rb +136 -104
- data/lib/sketchup-api-stubs/stubs/Geom/PolygonMesh.rb +56 -30
- data/lib/sketchup-api-stubs/stubs/Geom/Transformation.rb +76 -52
- data/lib/sketchup-api-stubs/stubs/Geom/Transformation2d.rb +35 -31
- data/lib/sketchup-api-stubs/stubs/Geom/UTM.rb +8 -16
- data/lib/sketchup-api-stubs/stubs/Geom/Vector2d.rb +135 -110
- data/lib/sketchup-api-stubs/stubs/Geom/Vector3d.rb +207 -222
- data/lib/sketchup-api-stubs/stubs/Geom.rb +6 -6
- data/lib/sketchup-api-stubs/stubs/LanguageHandler.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/AngularDimension.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinition.rb +11 -7
- data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinitions.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/ConnectionPoint.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Dictionary.rb +234 -0
- data/lib/sketchup-api-stubs/stubs/Layout/Document.rb +124 -10
- data/lib/sketchup-api-stubs/stubs/Layout/Ellipse.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Entities.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Entity.rb +112 -4
- data/lib/sketchup-api-stubs/stubs/Layout/FormattedText.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Grid.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Group.rb +4 -4
- data/lib/sketchup-api-stubs/stubs/Layout/Image.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Label.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Layer.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/LayerInstance.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Layers.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/LinearDimension.rb +56 -9
- data/lib/sketchup-api-stubs/stubs/Layout/LockedEntityError.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/LockedLayerError.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Page.rb +100 -1
- data/lib/sketchup-api-stubs/stubs/Layout/PageInfo.rb +13 -14
- data/lib/sketchup-api-stubs/stubs/Layout/Pages.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Path.rb +5 -3
- data/lib/sketchup-api-stubs/stubs/Layout/Rectangle.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/ReferenceEntity.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Style.rb +47 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Table.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/TableCell.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/TableColumn.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/TableRow.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Length.rb +9 -1
- data/lib/sketchup-api-stubs/stubs/Numeric.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Animation.rb +65 -13
- data/lib/sketchup-api-stubs/stubs/Sketchup/AppObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ArcCurve.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionaries.rb +2 -7
- data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionary.rb +16 -3
- data/lib/sketchup-api-stubs/stubs/Sketchup/Axes.rb +13 -13
- data/lib/sketchup-api-stubs/stubs/Sketchup/Behavior.rb +8 -14
- data/lib/sketchup-api-stubs/stubs/Sketchup/Camera.rb +10 -15
- data/lib/sketchup-api-stubs/stubs/Sketchup/ClassificationSchema.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Classifications.rb +2 -2
- data/lib/sketchup-api-stubs/stubs/Sketchup/Color.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentDefinition.rb +28 -14
- data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentInstance.rb +15 -8
- data/lib/sketchup-api-stubs/stubs/Sketchup/Console.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ConstructionLine.rb +7 -12
- data/lib/sketchup-api-stubs/stubs/Sketchup/ConstructionPoint.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Curve.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionList.rb +4 -10
- data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionsObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Dimension.rb +17 -15
- data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionLinear.rb +17 -17
- data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionRadial.rb +3 -3
- data/lib/sketchup-api-stubs/stubs/Sketchup/Drawingelement.rb +11 -14
- data/lib/sketchup-api-stubs/stubs/Sketchup/Edge.rb +2 -2
- data/lib/sketchup-api-stubs/stubs/Sketchup/EdgeUse.rb +10 -10
- data/lib/sketchup-api-stubs/stubs/Sketchup/Entities.rb +59 -19
- data/lib/sketchup-api-stubs/stubs/Sketchup/EntitiesBuilder.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/EntitiesObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Entity.rb +3 -3
- data/lib/sketchup-api-stubs/stubs/Sketchup/EntityObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Environment.rb +406 -0
- data/lib/sketchup-api-stubs/stubs/Sketchup/Environments.rb +185 -0
- data/lib/sketchup-api-stubs/stubs/Sketchup/EnvironmentsObserver.rb +113 -0
- data/lib/sketchup-api-stubs/stubs/Sketchup/ExtensionsManager.rb +3 -6
- data/lib/sketchup-api-stubs/stubs/Sketchup/Face.rb +94 -25
- data/lib/sketchup-api-stubs/stubs/Sketchup/FrameChangeObserver.rb +2 -2
- data/lib/sketchup-api-stubs/stubs/Sketchup/Group.rb +16 -26
- data/lib/sketchup-api-stubs/stubs/Sketchup/Http/Request.rb +24 -17
- data/lib/sketchup-api-stubs/stubs/Sketchup/Http/Response.rb +11 -9
- data/lib/sketchup-api-stubs/stubs/Sketchup/Http.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Image.rb +4 -67
- data/lib/sketchup-api-stubs/stubs/Sketchup/ImageRep.rb +2 -2
- data/lib/sketchup-api-stubs/stubs/Sketchup/Importer.rb +2 -2
- data/lib/sketchup-api-stubs/stubs/Sketchup/InputPoint.rb +34 -8
- data/lib/sketchup-api-stubs/stubs/Sketchup/InstanceObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/InstancePath.rb +4 -3
- data/lib/sketchup-api-stubs/stubs/Sketchup/Layer.rb +14 -8
- data/lib/sketchup-api-stubs/stubs/Sketchup/LayerFolder.rb +3 -45
- data/lib/sketchup-api-stubs/stubs/Sketchup/Layers.rb +1 -19
- data/lib/sketchup-api-stubs/stubs/Sketchup/LayersObserver.rb +1 -9
- data/lib/sketchup-api-stubs/stubs/Sketchup/Licensing/ExtensionLicense.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Licensing.rb +10 -3
- data/lib/sketchup-api-stubs/stubs/Sketchup/LineStyle.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/LineStyles.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/LoadHandler.rb +70 -0
- data/lib/sketchup-api-stubs/stubs/Sketchup/Loop.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Material.rb +831 -130
- data/lib/sketchup-api-stubs/stubs/Sketchup/Materials.rb +35 -22
- data/lib/sketchup-api-stubs/stubs/Sketchup/MaterialsObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Menu.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Model.rb +146 -88
- data/lib/sketchup-api-stubs/stubs/Sketchup/ModelObserver.rb +20 -5
- data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsManager.rb +14 -11
- data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProvider.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProviderObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Overlay.rb +17 -44
- data/lib/sketchup-api-stubs/stubs/Sketchup/OverlaysManager.rb +1 -13
- data/lib/sketchup-api-stubs/stubs/Sketchup/Page.rb +158 -16
- data/lib/sketchup-api-stubs/stubs/Sketchup/Pages.rb +48 -21
- data/lib/sketchup-api-stubs/stubs/Sketchup/PagesObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/PickHelper.rb +61 -40
- data/lib/sketchup-api-stubs/stubs/Sketchup/RegionalSettings.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb +13 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptionsObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/SectionPlane.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Selection.rb +84 -91
- data/lib/sketchup-api-stubs/stubs/Sketchup/SelectionObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Set.rb +1 -2
- data/lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfo.rb +9 -5
- data/lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfoObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Skp.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Snap.rb +125 -0
- data/lib/sketchup-api-stubs/stubs/Sketchup/Style.rb +20 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Styles.rb +59 -13
- data/lib/sketchup-api-stubs/stubs/Sketchup/Text.rb +29 -8
- data/lib/sketchup-api-stubs/stubs/Sketchup/Texture.rb +13 -31
- data/lib/sketchup-api-stubs/stubs/Sketchup/TextureWriter.rb +9 -9
- data/lib/sketchup-api-stubs/stubs/Sketchup/Tool.rb +229 -139
- data/lib/sketchup-api-stubs/stubs/Sketchup/Tools.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ToolsObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/UVHelper.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Vertex.rb +23 -22
- data/lib/sketchup-api-stubs/stubs/Sketchup/View.rb +336 -99
- data/lib/sketchup-api-stubs/stubs/Sketchup/ViewObserver.rb +34 -8
- data/lib/sketchup-api-stubs/stubs/Sketchup.rb +71 -36
- data/lib/sketchup-api-stubs/stubs/SketchupExtension.rb +11 -11
- data/lib/sketchup-api-stubs/stubs/String.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/UI/Command.rb +21 -9
- data/lib/sketchup-api-stubs/stubs/UI/HtmlDialog.rb +80 -5
- data/lib/sketchup-api-stubs/stubs/UI/Notification.rb +14 -3
- data/lib/sketchup-api-stubs/stubs/UI/Toolbar.rb +20 -3
- data/lib/sketchup-api-stubs/stubs/UI/WebDialog.rb +9 -6
- data/lib/sketchup-api-stubs/stubs/UI.rb +77 -14
- data/lib/sketchup-api-stubs/stubs/_top_level.rb +7 -7
- metadata +10 -24
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright:: Copyright
|
|
1
|
+
# Copyright:: Copyright 2026 Trimble Inc.
|
|
2
2
|
# License:: The MIT License (MIT)
|
|
3
3
|
|
|
4
4
|
# A collection of Materials objects. Each model contains a Materials collection
|
|
@@ -162,7 +162,7 @@ class Sketchup::Materials < Sketchup::Entity
|
|
|
162
162
|
# be skipped as the indices change. Instead copy the current collection to an
|
|
163
163
|
# array using +to_a+ and then use +each+ on the array, when removing content.
|
|
164
164
|
#
|
|
165
|
-
# @return [
|
|
165
|
+
# @return [Sketchup::Materials]
|
|
166
166
|
#
|
|
167
167
|
# @version SketchUp 6.0
|
|
168
168
|
#
|
|
@@ -193,9 +193,18 @@ class Sketchup::Materials < Sketchup::Entity
|
|
|
193
193
|
# If a matching material exist in the model it will be returned instead.
|
|
194
194
|
#
|
|
195
195
|
# @example
|
|
196
|
-
# # Load a material from the shipped SketchUp library.
|
|
197
|
-
#
|
|
198
|
-
#
|
|
196
|
+
# # Load a material from the shipped SketchUp library.
|
|
197
|
+
# materials_template = Sketchup.find_support_file('Materials/MaterialTemplate.skp')
|
|
198
|
+
# if materials_template && File.exist?(materials_template)
|
|
199
|
+
# # Newer SketchUp versions.
|
|
200
|
+
# materials_path = File.dirname(materials_template)
|
|
201
|
+
# files = Dir.glob(File.join(materials_path, '**', '*.skm'))
|
|
202
|
+
# path = files.first
|
|
203
|
+
# else
|
|
204
|
+
# # Older SketchUp versions.
|
|
205
|
+
# filename = 'Materials/Brick, Cladding and Siding/Cinder Block.skm'
|
|
206
|
+
# path = Sketchup.find_support_file(filename)
|
|
207
|
+
# end
|
|
199
208
|
# materials = Sketchup.active_model.materials
|
|
200
209
|
# material = materials.load(path)
|
|
201
210
|
#
|
|
@@ -224,24 +233,28 @@ class Sketchup::Materials < Sketchup::Entity
|
|
|
224
233
|
|
|
225
234
|
# Remove a given material.
|
|
226
235
|
#
|
|
227
|
-
#
|
|
228
|
-
#
|
|
229
|
-
#
|
|
230
|
-
#
|
|
231
|
-
#
|
|
232
|
-
#
|
|
233
|
-
#
|
|
234
|
-
#
|
|
235
|
-
# @example
|
|
236
|
-
#
|
|
237
|
-
#
|
|
238
|
-
#
|
|
236
|
+
# @bug On SketchUp versions prior to 2014 there is a bug in this method that
|
|
237
|
+
# could potentially lead to file corruption. If you call {#remove} on a
|
|
238
|
+
# material that is painted onto any entity in the active model (e.g. faces,
|
|
239
|
+
# edges, groups, ...), then calling this method will not successfully unpaint
|
|
240
|
+
# the entity and remove the material from the model.
|
|
241
|
+
# You must first unpaint all of the entities that respond to +.material+
|
|
242
|
+
# and +.back_material+ before calling {#remove}.
|
|
243
|
+
#
|
|
244
|
+
# @example Logic for removing a given material of an entity:
|
|
245
|
+
# # @param [Sketchup::Entity] entity
|
|
246
|
+
# # @param [Sketchup::Material] material_to_remove
|
|
247
|
+
# def remove_material(entity, material_to_remove)
|
|
248
|
+
# if entity.respond_to?(:material) do
|
|
249
|
+
# if entity.material.equal?(material_to_remove) do
|
|
250
|
+
# entity.material = nil
|
|
251
|
+
# end
|
|
239
252
|
# end
|
|
240
|
-
#
|
|
241
|
-
#
|
|
242
|
-
#
|
|
243
|
-
#
|
|
244
|
-
#
|
|
253
|
+
# # for entities that have a back material
|
|
254
|
+
# if entity.respond_to?(:back_material) do
|
|
255
|
+
# if entity.back_material.equal?(material_to_remove) do
|
|
256
|
+
# entity.back_material = nil
|
|
257
|
+
# end
|
|
245
258
|
# end
|
|
246
259
|
# end
|
|
247
260
|
#
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright:: Copyright
|
|
1
|
+
# Copyright:: Copyright 2026 Trimble Inc.
|
|
2
2
|
# License:: The MIT License (MIT)
|
|
3
3
|
|
|
4
4
|
# This is the interface to a SketchUp model. The model is the 3D drawing that
|
|
@@ -7,13 +7,6 @@
|
|
|
7
7
|
# current model, and from there you can use the model-level methods to start
|
|
8
8
|
# getting information and making changes.
|
|
9
9
|
#
|
|
10
|
-
# Constants:
|
|
11
|
-
# Product Family
|
|
12
|
-
# - Model::ProTrial
|
|
13
|
-
# - Model::ProLicensed
|
|
14
|
-
# - Model::MakeTrial
|
|
15
|
-
# - Model::MakeTrialExpired
|
|
16
|
-
#
|
|
17
10
|
# @bug Prior to SketchUp 2019.0 this class would yield +TypeError+ for all
|
|
18
11
|
# method calls if +#singleton_class+ was called on the model object.
|
|
19
12
|
#
|
|
@@ -32,10 +25,10 @@
|
|
|
32
25
|
# # Now that we have our handles, we can start pulling objects and making
|
|
33
26
|
# # method calls that are useful.
|
|
34
27
|
# first_entity = entities[0]
|
|
35
|
-
#
|
|
28
|
+
# puts "First thing in your model is a #{first_entity.typename}"
|
|
36
29
|
#
|
|
37
30
|
# number_materials = materials.length
|
|
38
|
-
#
|
|
31
|
+
# puts "Your model has #{number_materials} materials."
|
|
39
32
|
#
|
|
40
33
|
# new_edge = entities.add_line([0,0,0], [500,500,0])
|
|
41
34
|
#
|
|
@@ -178,9 +171,9 @@ class Sketchup::Model
|
|
|
178
171
|
# on the given path. A definition cannot be edited if any of its instances
|
|
179
172
|
# are locked.
|
|
180
173
|
#
|
|
181
|
-
# @note
|
|
182
|
-
#
|
|
183
|
-
# as the active entities
|
|
174
|
+
# @note When changing the active entities in SketchUp, the coordinate system
|
|
175
|
+
# also changes. Therefore, entities cannot be modified in the same operation
|
|
176
|
+
# as the active entities change. The API handles this automatically by
|
|
184
177
|
# starting and committing transparent operations as needed.
|
|
185
178
|
#
|
|
186
179
|
# If the API user tries to do this:
|
|
@@ -228,6 +221,24 @@ class Sketchup::Model
|
|
|
228
221
|
def active_path=(instance_path)
|
|
229
222
|
end
|
|
230
223
|
|
|
224
|
+
# The {#active_section_planes} method returns all of the active section planes in the model.
|
|
225
|
+
#
|
|
226
|
+
# @example SketchUp 2025 and newer
|
|
227
|
+
# model = Sketchup.active_model
|
|
228
|
+
# section_planes = model.active_section_planes
|
|
229
|
+
#
|
|
230
|
+
# @example SketchUp 2024 and older
|
|
231
|
+
# # In older SketchUp versions, you can achieve the same result with:
|
|
232
|
+
# model = Sketchup.active_model
|
|
233
|
+
# entities_collections = [Sketchup.active_model.entities] + model.definitions.map(&:entities)
|
|
234
|
+
# section_planes = entities_collections.map(&:active_section_plane).compact
|
|
235
|
+
#
|
|
236
|
+
# @return [Array<Sketchup::SectionPlane>]
|
|
237
|
+
#
|
|
238
|
+
# @version SketchUp 2026.0
|
|
239
|
+
def active_section_planes
|
|
240
|
+
end
|
|
241
|
+
|
|
231
242
|
# The {#active_view} method returns the active View object for this model.
|
|
232
243
|
#
|
|
233
244
|
# @example
|
|
@@ -498,6 +509,9 @@ class Sketchup::Model
|
|
|
498
509
|
# The {#drawing_element_visible?} method reports whether the given drawing
|
|
499
510
|
# element in an instance path is visible given the current model options.
|
|
500
511
|
#
|
|
512
|
+
# @bug Prior to version 2026.0 the method throws an exception when the last
|
|
513
|
+
# element in the instance path is a {Sketchup::Group} or {Sketchup::ComponentInstance}.
|
|
514
|
+
#
|
|
501
515
|
# @example Traversing every visible entity in the model
|
|
502
516
|
# module Example
|
|
503
517
|
#
|
|
@@ -575,6 +589,19 @@ class Sketchup::Model
|
|
|
575
589
|
def entities
|
|
576
590
|
end
|
|
577
591
|
|
|
592
|
+
# The {#environments} method is used to retrieve the {Sketchup::Environments} object for
|
|
593
|
+
# this model.
|
|
594
|
+
#
|
|
595
|
+
# @example
|
|
596
|
+
# model = Sketchup.active_model
|
|
597
|
+
# environments = model.environments
|
|
598
|
+
#
|
|
599
|
+
# @return [Sketchup::Environments]
|
|
600
|
+
#
|
|
601
|
+
# @version SketchUp 2025.0
|
|
602
|
+
def environments
|
|
603
|
+
end
|
|
604
|
+
|
|
578
605
|
# The export method is used to export a given file format. It knows which
|
|
579
606
|
# format to export based on the file extension you place on the file name.
|
|
580
607
|
# For example, a filename of "thing.obj" will export an OBJ file, whereas
|
|
@@ -588,10 +615,15 @@ class Sketchup::Model
|
|
|
588
615
|
# * SketchUp Pro 2015+ added IFC export capability.
|
|
589
616
|
# * SketchUp Pro 2016+ added PDF export capability.
|
|
590
617
|
# * SketchUp Pro 2018+ added options for all 3D exporters.
|
|
618
|
+
# * SketchUp 2024+ added glb and usdz exporters.
|
|
619
|
+
# * SketchUp 2026+ the IFC exporter has been replaced with a new implementation
|
|
620
|
+
# that provides specific export options.
|
|
591
621
|
#
|
|
592
622
|
# See the {file:pages/exporter_options.md Exporter Options} file for information
|
|
593
623
|
# on creating a valid hash for the various exporters.
|
|
594
624
|
#
|
|
625
|
+
# @bug IFC export on ARM macs isn't working for SketchUp 2022-2025.
|
|
626
|
+
#
|
|
595
627
|
# @example General use
|
|
596
628
|
# model = Sketchup.active_model
|
|
597
629
|
# show_summary = true
|
|
@@ -621,10 +653,11 @@ class Sketchup::Model
|
|
|
621
653
|
#
|
|
622
654
|
# @example IFC Example
|
|
623
655
|
# model = Sketchup.active_model
|
|
624
|
-
#
|
|
625
|
-
#
|
|
626
|
-
# :
|
|
627
|
-
# :
|
|
656
|
+
# options_hash = { :ifc_version => "IFC 4",
|
|
657
|
+
# :standard_ifc_hierarchy => true,
|
|
658
|
+
# :selectionset_only => false,
|
|
659
|
+
# :hidden_geometry => true,
|
|
660
|
+
# :tessellated_geometry => true }
|
|
628
661
|
# status = model.export('c:/my_export.ifc', options_hash)
|
|
629
662
|
#
|
|
630
663
|
# @overload export(path, show_summary = false)
|
|
@@ -720,8 +753,9 @@ class Sketchup::Model
|
|
|
720
753
|
# @param [Array<Integer>] ids_or_array Pass either a series of ids or a
|
|
721
754
|
# single array containing persistent ids.
|
|
722
755
|
#
|
|
723
|
-
# @return [Array<Sketchup::Entity
|
|
724
|
-
# {Sketchup::Entity} objects for each id found
|
|
756
|
+
# @return [Sketchup::Entity, Array<Sketchup::Entity>, nil] Returns an {Sketchup::Entity} if a
|
|
757
|
+
# single PID was given or an array of {Sketchup::Entity} objects for each id found or nil if
|
|
758
|
+
# nothing was found.
|
|
725
759
|
#
|
|
726
760
|
# @overload find_entity_by_persistent_id(ids_or_array, **scope)
|
|
727
761
|
#
|
|
@@ -730,23 +764,24 @@ class Sketchup::Model
|
|
|
730
764
|
# single array containing persistent ids.
|
|
731
765
|
# @param [Hash<Symbol, Boolean>] scope Limit the scope of the search to the
|
|
732
766
|
# given scope categories.
|
|
733
|
-
# @option [Boolean]
|
|
767
|
+
# @option scope [Boolean] :entities Search entities parent to
|
|
734
768
|
# {Sketchup::Entities}.
|
|
735
|
-
# @option [Boolean]
|
|
769
|
+
# @option scope [Boolean] :layers Search {Sketchup::Layers} for
|
|
736
770
|
# {Sketchup::Layer} entities.
|
|
737
|
-
# @option [Boolean]
|
|
771
|
+
# @option scope [Boolean] :layer_folders Search {Sketchup::Layers} for
|
|
738
772
|
# {Sketchup::LayerFolder} entities.
|
|
739
|
-
# @option [Boolean]
|
|
773
|
+
# @option scope [Boolean] :materials Search {Sketchup::Materials} for
|
|
740
774
|
# {Sketchup::Material} entities.
|
|
741
|
-
# @option [Boolean]
|
|
775
|
+
# @option scope [Boolean] :pages Search {Sketchup::Pages} for
|
|
742
776
|
# {Sketchup::Page} entities.
|
|
743
|
-
# @option [Boolean]
|
|
777
|
+
# @option scope [Boolean] :styles Search {Sketchup::Styles} for
|
|
744
778
|
# {Sketchup::Style} entities.
|
|
745
|
-
# @option [Boolean]
|
|
779
|
+
# @option scope [Boolean] :definitions Search {Sketchup::DefinitionList} for
|
|
746
780
|
# {Sketchup::ComponentDefinition} entities.
|
|
747
781
|
#
|
|
748
|
-
# @return [Array<Sketchup::Entity
|
|
749
|
-
# {Sketchup::Entity} objects for each id found
|
|
782
|
+
# @return [Sketchup::Entity, Array<Sketchup::Entity>, nil] Returns an {Sketchup::Entity} if a
|
|
783
|
+
# single PID was given or an array of {Sketchup::Entity} objects for each id found if multiple
|
|
784
|
+
# PIDs were given or nil if nothing was found.
|
|
750
785
|
#
|
|
751
786
|
# @version SketchUp 2017
|
|
752
787
|
def find_entity_by_persistent_id(*args)
|
|
@@ -755,11 +790,8 @@ class Sketchup::Model
|
|
|
755
790
|
# This methods determines if the model is georeferenced.
|
|
756
791
|
#
|
|
757
792
|
# @example
|
|
758
|
-
#
|
|
759
|
-
#
|
|
760
|
-
# else
|
|
761
|
-
# UI.messagebox('This model is NOT georeferenced.')
|
|
762
|
-
# end
|
|
793
|
+
# model = Sketchup.active_model
|
|
794
|
+
# model.georeferenced?
|
|
763
795
|
#
|
|
764
796
|
# @return [Boolean]
|
|
765
797
|
#
|
|
@@ -812,7 +844,16 @@ class Sketchup::Model
|
|
|
812
844
|
|
|
813
845
|
# Returns a value which indicates the product family of the installed SketchUp
|
|
814
846
|
# application.
|
|
815
|
-
#
|
|
847
|
+
#
|
|
848
|
+
# The constants for possible return values since SketchUp 2016:
|
|
849
|
+
#
|
|
850
|
+
# - {Sketchup::Model::ProTrial}
|
|
851
|
+
# - {Sketchup::Model::ProLicensed}
|
|
852
|
+
# - {Sketchup::Model::MakeTrial}
|
|
853
|
+
# - {Sketchup::Model::Make}
|
|
854
|
+
#
|
|
855
|
+
# In earlier SketchUp versions there were no defined constants and additional
|
|
856
|
+
# values could be returned. As of SketchUp 2013, the return values were:
|
|
816
857
|
# - +0+ = Unknown
|
|
817
858
|
# - +1+ = Pro Trial
|
|
818
859
|
# - +2+ = Pro
|
|
@@ -822,9 +863,6 @@ class Sketchup::Model
|
|
|
822
863
|
# - +6+ = Make
|
|
823
864
|
# - +7+ = Pro License Unavailable
|
|
824
865
|
#
|
|
825
|
-
# The Model class defines some of these values as constants as of SketchUp
|
|
826
|
-
# 2016.
|
|
827
|
-
#
|
|
828
866
|
# @example
|
|
829
867
|
# model = Sketchup.active_model
|
|
830
868
|
# product_family = model.get_product_family
|
|
@@ -940,6 +978,8 @@ class Sketchup::Model
|
|
|
940
978
|
# A 2-element array containing first the longitude then
|
|
941
979
|
# the latitude.
|
|
942
980
|
#
|
|
981
|
+
# @return [Geom::Point3d] A Point3d in model coordinates.
|
|
982
|
+
#
|
|
943
983
|
# @return [Geom::Point3d] a point3d object if successful, false if
|
|
944
984
|
# unsuccessful.
|
|
945
985
|
#
|
|
@@ -1101,8 +1141,6 @@ class Sketchup::Model
|
|
|
1101
1141
|
def options
|
|
1102
1142
|
end
|
|
1103
1143
|
|
|
1104
|
-
#
|
|
1105
|
-
# @api Overlays
|
|
1106
1144
|
#
|
|
1107
1145
|
# @example
|
|
1108
1146
|
# Sketchup.active_model.overlays.each { |overlay|
|
|
@@ -1146,6 +1184,10 @@ class Sketchup::Model
|
|
|
1146
1184
|
# The place_component method places a new component in the Model using the
|
|
1147
1185
|
# component placement tool.
|
|
1148
1186
|
#
|
|
1187
|
+
# @bug Before SketchUp 2026.0, attempting to place an empty component
|
|
1188
|
+
# would crash SketchUp. This function will now raise an ArgumentError
|
|
1189
|
+
# when called with an empty component definition.
|
|
1190
|
+
#
|
|
1149
1191
|
# @example
|
|
1150
1192
|
# model.place_component componentdefinition, repeat
|
|
1151
1193
|
#
|
|
@@ -1157,6 +1199,10 @@ class Sketchup::Model
|
|
|
1157
1199
|
# If set to true, stay in the component
|
|
1158
1200
|
# placement tool and place multiple components.
|
|
1159
1201
|
#
|
|
1202
|
+
# @raise [ArgumentError] if the component cannot not be placed
|
|
1203
|
+
# (for example, if it is an empty component definition).
|
|
1204
|
+
# Added in SketchUp 2026.0.
|
|
1205
|
+
#
|
|
1160
1206
|
# @return [Sketchup::Model, nil] The model object on success or Nil
|
|
1161
1207
|
#
|
|
1162
1208
|
# @version SketchUp 6.0
|
|
@@ -1180,6 +1226,8 @@ class Sketchup::Model
|
|
|
1180
1226
|
# @param [Geom::Point3d] point
|
|
1181
1227
|
# A Point3d object.
|
|
1182
1228
|
#
|
|
1229
|
+
# @return [Geom::Point3d] Point3d[longitude_deg, latitude_deg, altitude_m]
|
|
1230
|
+
#
|
|
1183
1231
|
# @return [Geom::Point3d, Geom::LatLong] a LatLong or Point3d object. See
|
|
1184
1232
|
# details for information.
|
|
1185
1233
|
#
|
|
@@ -1205,31 +1253,26 @@ class Sketchup::Model
|
|
|
1205
1253
|
def point_to_utm(point)
|
|
1206
1254
|
end
|
|
1207
1255
|
|
|
1208
|
-
# The raytest method is used to cast a ray (line) through the model and return
|
|
1256
|
+
# The {#raytest} method is used to cast a ray (line) through the model and return
|
|
1209
1257
|
# the first thing that the ray hits.
|
|
1210
1258
|
#
|
|
1211
1259
|
# A ray is a two element array containing a point and a vector
|
|
1212
|
-
# [Geom::Point3d
|
|
1260
|
+
# +[Geom::Point3d, Geom::Vector3d]+. The point defines the start point of
|
|
1213
1261
|
# the ray and the vector defines the direction. If direction can not be
|
|
1214
|
-
# normalized (e.g. direction = [0, 0, 0]), direction is taken as a point the
|
|
1262
|
+
# normalized (e.g. +direction = [0, 0, 0]+), direction is taken as a point the
|
|
1215
1263
|
# ray intersects.
|
|
1216
1264
|
#
|
|
1217
|
-
#
|
|
1218
|
-
#
|
|
1219
|
-
#
|
|
1220
|
-
#
|
|
1221
|
-
# is contained by another component instance and so on,
|
|
1222
|
-
# the instance path would be [Component1, Component2,
|
|
1223
|
-
# Component3...].
|
|
1265
|
+
# @example Using a pickray from the view
|
|
1266
|
+
# model = Sketchup.active_model
|
|
1267
|
+
# ray = model.active_view.pickray(200, 400) # Screen coordinates
|
|
1268
|
+
# item = model.raytest(ray)
|
|
1224
1269
|
#
|
|
1225
|
-
# @example
|
|
1270
|
+
# @example Using an arbitrary ray
|
|
1226
1271
|
# model = Sketchup.active_model
|
|
1227
1272
|
# ray = [Geom::Point3d.new(1, 2, 3), Geom::Vector3d.new(4, 5, 6)]
|
|
1228
1273
|
# item = model.raytest(ray, false) # Consider hidden geometry when
|
|
1229
1274
|
# # computing intersections.
|
|
1230
1275
|
#
|
|
1231
|
-
# @note The parameter wysiwyg_flag was added in SU8 M1.
|
|
1232
|
-
#
|
|
1233
1276
|
# @param [Array(Geom::Point3d, Geom::Vector3d)] ray
|
|
1234
1277
|
# A two element array containing a point and a vector.
|
|
1235
1278
|
#
|
|
@@ -1240,7 +1283,15 @@ class Sketchup::Model
|
|
|
1240
1283
|
# defaults to true (WYSIWYG) - i.e. hidden geometry is
|
|
1241
1284
|
# not intersected against.
|
|
1242
1285
|
#
|
|
1243
|
-
# @return [Array(Geom::Point3d, Array<Sketchup::Drawingelement>), nil]
|
|
1286
|
+
# @return [Array(Geom::Point3d, Array<Sketchup::Drawingelement>), nil] The first value is
|
|
1287
|
+
# a {Geom::Point3d} where the item that the ray passed through exists. The second element is
|
|
1288
|
+
# the instance path array of the entity that the ray hit. For example, if the ray hits a face
|
|
1289
|
+
# that is contained by a component instance the instance path would be [Component1].
|
|
1290
|
+
# If the ray hit a face that is contained by a component instance, which is contained by
|
|
1291
|
+
# another component instance and so on, the instance path would be [Component1, Component2,
|
|
1292
|
+
# Component3...].
|
|
1293
|
+
#
|
|
1294
|
+
# @see Sketchup::View#pickray
|
|
1244
1295
|
#
|
|
1245
1296
|
# @version SketchUp 6.0
|
|
1246
1297
|
def raytest(ray, wysiwyg_flag = true)
|
|
@@ -1321,23 +1372,25 @@ class Sketchup::Model
|
|
|
1321
1372
|
# @param [String] path
|
|
1322
1373
|
# @param [Integer] version
|
|
1323
1374
|
# Possible values are:
|
|
1324
|
-
# - Sketchup::Model::VERSION_3
|
|
1325
|
-
# - Sketchup::Model::VERSION_4
|
|
1326
|
-
# - Sketchup::Model::VERSION_5
|
|
1327
|
-
# - Sketchup::Model::VERSION_6
|
|
1328
|
-
# - Sketchup::Model::VERSION_7
|
|
1329
|
-
# - Sketchup::Model::VERSION_8
|
|
1330
|
-
# - Sketchup::Model::VERSION_2013
|
|
1331
|
-
# - Sketchup::Model::VERSION_2014
|
|
1332
|
-
# - Sketchup::Model::VERSION_2015
|
|
1333
|
-
# - Sketchup::Model::VERSION_2016
|
|
1334
|
-
# - Sketchup::Model::VERSION_2017
|
|
1335
|
-
# - Sketchup::Model::VERSION_2018
|
|
1336
|
-
# - Sketchup::Model::VERSION_2019
|
|
1337
|
-
# - Sketchup::Model::VERSION_2020
|
|
1338
|
-
# - Sketchup::Model::VERSION_2021
|
|
1375
|
+
# - {Sketchup::Model::VERSION_3}
|
|
1376
|
+
# - {Sketchup::Model::VERSION_4}
|
|
1377
|
+
# - {Sketchup::Model::VERSION_5}
|
|
1378
|
+
# - {Sketchup::Model::VERSION_6}
|
|
1379
|
+
# - {Sketchup::Model::VERSION_7}
|
|
1380
|
+
# - {Sketchup::Model::VERSION_8}
|
|
1381
|
+
# - {Sketchup::Model::VERSION_2013}
|
|
1382
|
+
# - {Sketchup::Model::VERSION_2014}
|
|
1383
|
+
# - {Sketchup::Model::VERSION_2015}
|
|
1384
|
+
# - {Sketchup::Model::VERSION_2016}
|
|
1385
|
+
# - {Sketchup::Model::VERSION_2017}
|
|
1386
|
+
# - {Sketchup::Model::VERSION_2018}
|
|
1387
|
+
# - {Sketchup::Model::VERSION_2019}
|
|
1388
|
+
# - {Sketchup::Model::VERSION_2020}
|
|
1389
|
+
# - {Sketchup::Model::VERSION_2021}
|
|
1339
1390
|
#
|
|
1340
1391
|
# @return [Boolean] +true+ if successful, +false+ if unsuccessful
|
|
1392
|
+
#
|
|
1393
|
+
# @see #save_copy
|
|
1341
1394
|
def save(*args)
|
|
1342
1395
|
end
|
|
1343
1396
|
|
|
@@ -1353,16 +1406,25 @@ class Sketchup::Model
|
|
|
1353
1406
|
# path = File.join(ENV['Home'], 'Desktop', 'mysketchupcopy_v8.skp')
|
|
1354
1407
|
# status = model.save_copy(path, Sketchup::Model::VERSION_8)
|
|
1355
1408
|
#
|
|
1356
|
-
# @
|
|
1357
|
-
#
|
|
1409
|
+
# @overload save_copy(path)
|
|
1410
|
+
#
|
|
1411
|
+
# @param [String] path
|
|
1412
|
+
# The path of the file to save the model copy to.
|
|
1413
|
+
#
|
|
1414
|
+
# @overload save_copy(path, version)
|
|
1415
|
+
#
|
|
1416
|
+
# @param [String] path
|
|
1417
|
+
# The path of the file to save the model copy to.
|
|
1358
1418
|
#
|
|
1359
|
-
#
|
|
1360
|
-
#
|
|
1419
|
+
# @param [Integer] version
|
|
1420
|
+
# See {Sketchup::Model#save} for supported values.
|
|
1361
1421
|
#
|
|
1362
1422
|
# @return [Boolean] true if successful, false if unsuccessful
|
|
1363
1423
|
#
|
|
1424
|
+
# @see #save
|
|
1425
|
+
#
|
|
1364
1426
|
# @version SketchUp 2014
|
|
1365
|
-
def save_copy(
|
|
1427
|
+
def save_copy(*args)
|
|
1366
1428
|
end
|
|
1367
1429
|
|
|
1368
1430
|
# The save_thumbnail method is used to save a thumbnail image to a file.
|
|
@@ -1383,22 +1445,23 @@ class Sketchup::Model
|
|
|
1383
1445
|
def save_thumbnail(filename)
|
|
1384
1446
|
end
|
|
1385
1447
|
|
|
1386
|
-
#
|
|
1387
|
-
#
|
|
1388
|
-
#
|
|
1448
|
+
# The {#select_tool} method is used to select a SketchUp Tool object as the active tool.
|
|
1449
|
+
# To activate the native Select tool, pass nil as the argument.
|
|
1450
|
+
#
|
|
1451
|
+
# Before calling this method, you need to implement the SketchUp Tool interface
|
|
1452
|
+
# and create a tool object. Then, pass the tool object to this method to activate it.
|
|
1389
1453
|
#
|
|
1390
|
-
#
|
|
1391
|
-
# must implement the SketchUp Tool interface to create a tool, prior to calling
|
|
1392
|
-
# this method, and then instance the tool implementation and pass the object to
|
|
1393
|
-
# this method. If you attempt to set the select_tool to nil in the initialize
|
|
1394
|
-
# method of a tool you have written, it will be ignored.
|
|
1454
|
+
# the native Select tool.
|
|
1395
1455
|
#
|
|
1396
1456
|
# @example
|
|
1397
1457
|
# model = Sketchup.active_model
|
|
1398
1458
|
# tool = model.select_tool(nil)
|
|
1399
1459
|
#
|
|
1460
|
+
# @note If you call select_tool from within the initialize method of a custom tool, the call will
|
|
1461
|
+
# be ignored.
|
|
1462
|
+
#
|
|
1400
1463
|
# @param [Object] tool
|
|
1401
|
-
#
|
|
1464
|
+
# A tool instance object to activate, or nil to activate
|
|
1402
1465
|
#
|
|
1403
1466
|
# @return [Sketchup::Model] The Model object.
|
|
1404
1467
|
#
|
|
@@ -1586,7 +1649,7 @@ class Sketchup::Model
|
|
|
1586
1649
|
def tags=(tags)
|
|
1587
1650
|
end
|
|
1588
1651
|
|
|
1589
|
-
# The
|
|
1652
|
+
# The {#title} method retrieves the name of the model. If the model is saved on
|
|
1590
1653
|
# disk, returns the file name without extension. Otherwise returns an empty
|
|
1591
1654
|
# string.
|
|
1592
1655
|
#
|
|
@@ -1641,11 +1704,6 @@ class Sketchup::Model
|
|
|
1641
1704
|
# # This is a silly example since the active model is generally going to
|
|
1642
1705
|
# # be valid, but it illustrates the idea.
|
|
1643
1706
|
# model = Sketchup.active_model
|
|
1644
|
-
# if model.valid?
|
|
1645
|
-
# UI.messagebox('This model is valid.')
|
|
1646
|
-
# else
|
|
1647
|
-
# UI.messagebox('This model is NOT valid.')
|
|
1648
|
-
# end
|
|
1649
1707
|
#
|
|
1650
1708
|
# @return [Boolean]
|
|
1651
1709
|
#
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright:: Copyright
|
|
1
|
+
# Copyright:: Copyright 2026 Trimble Inc.
|
|
2
2
|
# License:: The MIT License (MIT)
|
|
3
3
|
|
|
4
4
|
# This observer interface is implemented to react to model events.
|
|
@@ -168,22 +168,37 @@ class Sketchup::ModelObserver
|
|
|
168
168
|
def onExplode(model)
|
|
169
169
|
end
|
|
170
170
|
|
|
171
|
-
# The {#onPidChanged} method is invoked when a persistent id
|
|
172
|
-
#
|
|
171
|
+
# The {#onPidChanged} method is invoked when a {Sketchup::Entity#persistent_id persistent id} of
|
|
172
|
+
# an entity changes within the model.
|
|
173
173
|
#
|
|
174
174
|
# @example
|
|
175
|
-
#
|
|
176
|
-
#
|
|
175
|
+
# class PidObserver < Sketchup::ModelObserver
|
|
176
|
+
# def onPidChanged(model, old_pid, new_pid)
|
|
177
|
+
# entity = model.find_entity_by_persistent_id(new_pid)
|
|
178
|
+
# puts "Entity with new PID #{new_pid}: #{entity}"
|
|
179
|
+
# end
|
|
177
180
|
# end
|
|
178
181
|
#
|
|
182
|
+
# model = Sketchup.active_model
|
|
183
|
+
# model.add_observer(PidObserver.new)
|
|
184
|
+
#
|
|
185
|
+
# @note This callback is useful for tracking changes to entities that result in new PIDs, such as
|
|
186
|
+
# grouping or other modifications that result in new entities.
|
|
187
|
+
#
|
|
179
188
|
# @param [Sketchup::Model] model
|
|
180
189
|
#
|
|
181
190
|
# @param [Integer] old_pid
|
|
191
|
+
# The old persistent ID of the entity.
|
|
182
192
|
#
|
|
183
193
|
# @param [Integer] new_pid
|
|
194
|
+
# The new persistent ID of the entity.
|
|
184
195
|
#
|
|
185
196
|
# @return [nil]
|
|
186
197
|
#
|
|
198
|
+
# @see Sketchup::Model#find_entity_by_persistent_id
|
|
199
|
+
#
|
|
200
|
+
# @see Sketchup::Entity#persistent_id
|
|
201
|
+
#
|
|
187
202
|
# @version SketchUp 2017
|
|
188
203
|
def onPidChanged(model, old_pid, new_pid)
|
|
189
204
|
end
|
|
@@ -1,9 +1,22 @@
|
|
|
1
|
-
# Copyright:: Copyright
|
|
1
|
+
# Copyright:: Copyright 2026 Trimble Inc.
|
|
2
2
|
# License:: The MIT License (MIT)
|
|
3
3
|
|
|
4
4
|
# The OptionsManager class manages various kinds of OptionsProviders on a
|
|
5
5
|
# Model.
|
|
6
6
|
#
|
|
7
|
+
# To get the OptionsProvider key list, run the following code in the ruby console:
|
|
8
|
+
#
|
|
9
|
+
# @example
|
|
10
|
+
# options_manager = Sketchup.active_model.options
|
|
11
|
+
# options_manager.keys.each { |provider_name|
|
|
12
|
+
# options_provider = options_manager[provider_name]
|
|
13
|
+
# puts provider_name
|
|
14
|
+
# options_provider.each { |key, value|
|
|
15
|
+
# puts " #{key} - #{value}"
|
|
16
|
+
# }
|
|
17
|
+
# puts
|
|
18
|
+
# }
|
|
19
|
+
#
|
|
7
20
|
# @version SketchUp 6.0
|
|
8
21
|
class Sketchup::OptionsManager
|
|
9
22
|
|
|
@@ -25,11 +38,6 @@ class Sketchup::OptionsManager
|
|
|
25
38
|
# model = Sketchup.active_model
|
|
26
39
|
# manager = model.options
|
|
27
40
|
# provider = manager[0]
|
|
28
|
-
# if (provider)
|
|
29
|
-
# UI.messagebox provider.name
|
|
30
|
-
# else
|
|
31
|
-
# UI.messagebox "Failure"
|
|
32
|
-
# end
|
|
33
41
|
#
|
|
34
42
|
# @overload [](index)
|
|
35
43
|
#
|
|
@@ -86,11 +94,6 @@ class Sketchup::OptionsManager
|
|
|
86
94
|
# model = Sketchup.active_model
|
|
87
95
|
# manager = model.options
|
|
88
96
|
# optionproviderarray = manager.keys
|
|
89
|
-
# if (optionproviderarray)
|
|
90
|
-
# UI.messagebox optionproviderarray
|
|
91
|
-
# else
|
|
92
|
-
# UI.messagebox "Failure"
|
|
93
|
-
# end
|
|
94
97
|
#
|
|
95
98
|
# @return keys - Array of string keys
|
|
96
99
|
#
|