sketchup-api-stubs 0.7.9 → 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.
Files changed (160) hide show
  1. checksums.yaml +4 -4
  2. data/lib/sketchup-api-stubs/sketchup.rb +157 -151
  3. data/lib/sketchup-api-stubs/stubs/Array.rb +741 -741
  4. data/lib/sketchup-api-stubs/stubs/Geom/BoundingBox.rb +322 -322
  5. data/lib/sketchup-api-stubs/stubs/Geom/Bounds2d.rb +182 -172
  6. data/lib/sketchup-api-stubs/stubs/Geom/LatLong.rb +111 -126
  7. data/lib/sketchup-api-stubs/stubs/Geom/OrientedBounds2d.rb +102 -102
  8. data/lib/sketchup-api-stubs/stubs/Geom/Point2d.rb +423 -400
  9. data/lib/sketchup-api-stubs/stubs/Geom/Point3d.rb +693 -661
  10. data/lib/sketchup-api-stubs/stubs/Geom/PolygonMesh.rb +535 -509
  11. data/lib/sketchup-api-stubs/stubs/Geom/Transformation.rb +500 -476
  12. data/lib/sketchup-api-stubs/stubs/Geom/Transformation2d.rb +267 -263
  13. data/lib/sketchup-api-stubs/stubs/Geom/UTM.rb +133 -141
  14. data/lib/sketchup-api-stubs/stubs/Geom/Vector2d.rb +547 -522
  15. data/lib/sketchup-api-stubs/stubs/Geom/Vector3d.rb +678 -693
  16. data/lib/sketchup-api-stubs/stubs/Geom.rb +351 -351
  17. data/lib/sketchup-api-stubs/stubs/LanguageHandler.rb +93 -93
  18. data/lib/sketchup-api-stubs/stubs/Layout/AngularDimension.rb +595 -595
  19. data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinition.rb +751 -747
  20. data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinitions.rb +183 -183
  21. data/lib/sketchup-api-stubs/stubs/Layout/ConnectionPoint.rb +70 -70
  22. data/lib/sketchup-api-stubs/stubs/Layout/Dictionary.rb +234 -0
  23. data/lib/sketchup-api-stubs/stubs/Layout/Document.rb +683 -517
  24. data/lib/sketchup-api-stubs/stubs/Layout/Ellipse.rb +29 -29
  25. data/lib/sketchup-api-stubs/stubs/Layout/Entities.rb +148 -148
  26. data/lib/sketchup-api-stubs/stubs/Layout/Entity.rb +464 -353
  27. data/lib/sketchup-api-stubs/stubs/Layout/FormattedText.rb +354 -354
  28. data/lib/sketchup-api-stubs/stubs/Layout/Grid.rb +311 -311
  29. data/lib/sketchup-api-stubs/stubs/Layout/Group.rb +261 -261
  30. data/lib/sketchup-api-stubs/stubs/Layout/Image.rb +91 -91
  31. data/lib/sketchup-api-stubs/stubs/Layout/Label.rb +370 -370
  32. data/lib/sketchup-api-stubs/stubs/Layout/Layer.rb +218 -218
  33. data/lib/sketchup-api-stubs/stubs/Layout/LayerInstance.rb +128 -128
  34. data/lib/sketchup-api-stubs/stubs/Layout/Layers.rb +225 -225
  35. data/lib/sketchup-api-stubs/stubs/Layout/LinearDimension.rb +614 -567
  36. data/lib/sketchup-api-stubs/stubs/Layout/LockedEntityError.rb +10 -10
  37. data/lib/sketchup-api-stubs/stubs/Layout/LockedLayerError.rb +11 -11
  38. data/lib/sketchup-api-stubs/stubs/Layout/Page.rb +282 -183
  39. data/lib/sketchup-api-stubs/stubs/Layout/PageInfo.rb +458 -387
  40. data/lib/sketchup-api-stubs/stubs/Layout/Pages.rb +209 -209
  41. data/lib/sketchup-api-stubs/stubs/Layout/Path.rb +346 -344
  42. data/lib/sketchup-api-stubs/stubs/Layout/Rectangle.rb +174 -174
  43. data/lib/sketchup-api-stubs/stubs/Layout/ReferenceEntity.rb +82 -82
  44. data/lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb +714 -692
  45. data/lib/sketchup-api-stubs/stubs/Layout/Style.rb +1565 -1519
  46. data/lib/sketchup-api-stubs/stubs/Layout/Table.rb +290 -290
  47. data/lib/sketchup-api-stubs/stubs/Layout/TableCell.rb +149 -149
  48. data/lib/sketchup-api-stubs/stubs/Layout/TableColumn.rb +139 -139
  49. data/lib/sketchup-api-stubs/stubs/Layout/TableRow.rb +135 -135
  50. data/lib/sketchup-api-stubs/stubs/Layout.rb +25 -25
  51. data/lib/sketchup-api-stubs/stubs/Length.rb +286 -278
  52. data/lib/sketchup-api-stubs/stubs/Numeric.rb +249 -249
  53. data/lib/sketchup-api-stubs/stubs/Sketchup/Animation.rb +196 -144
  54. data/lib/sketchup-api-stubs/stubs/Sketchup/AppObserver.rb +169 -169
  55. data/lib/sketchup-api-stubs/stubs/Sketchup/ArcCurve.rb +226 -209
  56. data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionaries.rb +145 -150
  57. data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionary.rb +294 -281
  58. data/lib/sketchup-api-stubs/stubs/Sketchup/Axes.rb +149 -149
  59. data/lib/sketchup-api-stubs/stubs/Sketchup/Behavior.rb +296 -302
  60. data/lib/sketchup-api-stubs/stubs/Sketchup/Camera.rb +473 -478
  61. data/lib/sketchup-api-stubs/stubs/Sketchup/ClassificationSchema.rb +63 -63
  62. data/lib/sketchup-api-stubs/stubs/Sketchup/Classifications.rb +121 -121
  63. data/lib/sketchup-api-stubs/stubs/Sketchup/Color.rb +294 -294
  64. data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentDefinition.rb +673 -659
  65. data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentInstance.rb +600 -593
  66. data/lib/sketchup-api-stubs/stubs/Sketchup/Console.rb +76 -76
  67. data/lib/sketchup-api-stubs/stubs/Sketchup/ConstructionLine.rb +252 -257
  68. data/lib/sketchup-api-stubs/stubs/Sketchup/ConstructionPoint.rb +32 -32
  69. data/lib/sketchup-api-stubs/stubs/Sketchup/Curve.rb +201 -201
  70. data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionList.rb +443 -449
  71. data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionObserver.rb +74 -74
  72. data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionsObserver.rb +104 -104
  73. data/lib/sketchup-api-stubs/stubs/Sketchup/Dimension.rb +167 -165
  74. data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionLinear.rb +306 -306
  75. data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionObserver.rb +42 -42
  76. data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionRadial.rb +87 -87
  77. data/lib/sketchup-api-stubs/stubs/Sketchup/Drawingelement.rb +403 -406
  78. data/lib/sketchup-api-stubs/stubs/Sketchup/Edge.rb +397 -397
  79. data/lib/sketchup-api-stubs/stubs/Sketchup/EdgeUse.rb +211 -211
  80. data/lib/sketchup-api-stubs/stubs/Sketchup/Entities.rb +1282 -1239
  81. data/lib/sketchup-api-stubs/stubs/Sketchup/EntitiesBuilder.rb +261 -261
  82. data/lib/sketchup-api-stubs/stubs/Sketchup/EntitiesObserver.rb +127 -127
  83. data/lib/sketchup-api-stubs/stubs/Sketchup/Entity.rb +519 -545
  84. data/lib/sketchup-api-stubs/stubs/Sketchup/EntityObserver.rb +60 -60
  85. data/lib/sketchup-api-stubs/stubs/Sketchup/Environment.rb +406 -0
  86. data/lib/sketchup-api-stubs/stubs/Sketchup/Environments.rb +185 -0
  87. data/lib/sketchup-api-stubs/stubs/Sketchup/EnvironmentsObserver.rb +113 -0
  88. data/lib/sketchup-api-stubs/stubs/Sketchup/ExtensionsManager.rb +122 -125
  89. data/lib/sketchup-api-stubs/stubs/Sketchup/Face.rb +1006 -937
  90. data/lib/sketchup-api-stubs/stubs/Sketchup/FrameChangeObserver.rb +102 -102
  91. data/lib/sketchup-api-stubs/stubs/Sketchup/Group.rb +740 -750
  92. data/lib/sketchup-api-stubs/stubs/Sketchup/Http/Request.rb +289 -282
  93. data/lib/sketchup-api-stubs/stubs/Sketchup/Http/Response.rb +64 -62
  94. data/lib/sketchup-api-stubs/stubs/Sketchup/Http.rb +27 -27
  95. data/lib/sketchup-api-stubs/stubs/Sketchup/Image.rb +405 -468
  96. data/lib/sketchup-api-stubs/stubs/Sketchup/ImageRep.rb +266 -266
  97. data/lib/sketchup-api-stubs/stubs/Sketchup/Importer.rb +189 -189
  98. data/lib/sketchup-api-stubs/stubs/Sketchup/InputPoint.rb +432 -406
  99. data/lib/sketchup-api-stubs/stubs/Sketchup/InstanceObserver.rb +84 -84
  100. data/lib/sketchup-api-stubs/stubs/Sketchup/InstancePath.rb +307 -306
  101. data/lib/sketchup-api-stubs/stubs/Sketchup/Layer.rb +332 -326
  102. data/lib/sketchup-api-stubs/stubs/Sketchup/LayerFolder.rb +380 -422
  103. data/lib/sketchup-api-stubs/stubs/Sketchup/Layers.rb +409 -427
  104. data/lib/sketchup-api-stubs/stubs/Sketchup/LayersObserver.rb +241 -249
  105. data/lib/sketchup-api-stubs/stubs/Sketchup/Licensing/ExtensionLicense.rb +86 -86
  106. data/lib/sketchup-api-stubs/stubs/Sketchup/Licensing.rb +55 -48
  107. data/lib/sketchup-api-stubs/stubs/Sketchup/LineStyle.rb +24 -24
  108. data/lib/sketchup-api-stubs/stubs/Sketchup/LineStyles.rb +114 -114
  109. data/lib/sketchup-api-stubs/stubs/Sketchup/LoadHandler.rb +70 -0
  110. data/lib/sketchup-api-stubs/stubs/Sketchup/Loop.rb +137 -137
  111. data/lib/sketchup-api-stubs/stubs/Sketchup/Material.rb +1115 -414
  112. data/lib/sketchup-api-stubs/stubs/Sketchup/Materials.rb +330 -317
  113. data/lib/sketchup-api-stubs/stubs/Sketchup/MaterialsObserver.rb +142 -142
  114. data/lib/sketchup-api-stubs/stubs/Sketchup/Menu.rb +93 -93
  115. data/lib/sketchup-api-stubs/stubs/Sketchup/Model.rb +1714 -1652
  116. data/lib/sketchup-api-stubs/stubs/Sketchup/ModelObserver.rb +372 -357
  117. data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsManager.rb +133 -130
  118. data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProvider.rb +271 -271
  119. data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProviderObserver.rb +58 -58
  120. data/lib/sketchup-api-stubs/stubs/Sketchup/Overlay.rb +463 -490
  121. data/lib/sketchup-api-stubs/stubs/Sketchup/OverlaysManager.rb +104 -116
  122. data/lib/sketchup-api-stubs/stubs/Sketchup/Page.rb +939 -797
  123. data/lib/sketchup-api-stubs/stubs/Sketchup/Pages.rb +388 -361
  124. data/lib/sketchup-api-stubs/stubs/Sketchup/PagesObserver.rb +77 -77
  125. data/lib/sketchup-api-stubs/stubs/Sketchup/PickHelper.rb +501 -478
  126. data/lib/sketchup-api-stubs/stubs/Sketchup/RegionalSettings.rb +43 -43
  127. data/lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb +385 -361
  128. data/lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptionsObserver.rb +45 -45
  129. data/lib/sketchup-api-stubs/stubs/Sketchup/SectionPlane.rb +150 -150
  130. data/lib/sketchup-api-stubs/stubs/Sketchup/Selection.rb +451 -458
  131. data/lib/sketchup-api-stubs/stubs/Sketchup/SelectionObserver.rb +115 -115
  132. data/lib/sketchup-api-stubs/stubs/Sketchup/Set.rb +211 -212
  133. data/lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfo.rb +259 -255
  134. data/lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfoObserver.rb +59 -59
  135. data/lib/sketchup-api-stubs/stubs/Sketchup/Skp.rb +40 -40
  136. data/lib/sketchup-api-stubs/stubs/Sketchup/Snap.rb +125 -0
  137. data/lib/sketchup-api-stubs/stubs/Sketchup/Style.rb +88 -69
  138. data/lib/sketchup-api-stubs/stubs/Sketchup/Styles.rb +263 -217
  139. data/lib/sketchup-api-stubs/stubs/Sketchup/Text.rb +283 -262
  140. data/lib/sketchup-api-stubs/stubs/Sketchup/Texture.rb +199 -217
  141. data/lib/sketchup-api-stubs/stubs/Sketchup/TextureWriter.rb +237 -237
  142. data/lib/sketchup-api-stubs/stubs/Sketchup/Tool.rb +924 -834
  143. data/lib/sketchup-api-stubs/stubs/Sketchup/Tools.rb +132 -132
  144. data/lib/sketchup-api-stubs/stubs/Sketchup/ToolsObserver.rb +156 -156
  145. data/lib/sketchup-api-stubs/stubs/Sketchup/UVHelper.rb +75 -75
  146. data/lib/sketchup-api-stubs/stubs/Sketchup/Vertex.rb +143 -142
  147. data/lib/sketchup-api-stubs/stubs/Sketchup/View.rb +1566 -1311
  148. data/lib/sketchup-api-stubs/stubs/Sketchup/ViewObserver.rb +71 -45
  149. data/lib/sketchup-api-stubs/stubs/Sketchup.rb +1429 -1377
  150. data/lib/sketchup-api-stubs/stubs/SketchupExtension.rb +353 -353
  151. data/lib/sketchup-api-stubs/stubs/String.rb +24 -24
  152. data/lib/sketchup-api-stubs/stubs/UI/Command.rb +399 -389
  153. data/lib/sketchup-api-stubs/stubs/UI/HtmlDialog.rb +580 -494
  154. data/lib/sketchup-api-stubs/stubs/UI/Notification.rb +280 -269
  155. data/lib/sketchup-api-stubs/stubs/UI/Toolbar.rb +258 -241
  156. data/lib/sketchup-api-stubs/stubs/UI/WebDialog.rb +636 -635
  157. data/lib/sketchup-api-stubs/stubs/UI.rb +791 -683
  158. data/lib/sketchup-api-stubs/stubs/_top_level.rb +303 -303
  159. data/lib/sketchup-api-stubs.rb +1 -1
  160. metadata +10 -24
@@ -1,40 +1,40 @@
1
- # Copyright:: Copyright 2023 Trimble Inc.
2
- # License:: The MIT License (MIT)
3
-
4
- # The {Sketchup::Skp} module is used to read metadata from external SketchUp
5
- # files without loading the whole file.
6
- #
7
- # @version SketchUp 2021.0
8
- module Sketchup::Skp
9
-
10
- # Class Methods
11
-
12
- # The {.read_guid} method is used to read the GUID, globally unique identifier,
13
- # for an external model.
14
- #
15
- # In SketchUp, GUIDs are used to test if {Sketchup::ComponentDefinition}s and
16
- # {Sketchup::Model}s match (a component being an embedded model).
17
- # When you insert a component to a model, its GUID is compared to existing
18
- # component definitions in that model, and if there is a match the existing
19
- # component definition is re-used rather than a duplicate being added.
20
- # When a component definition is modified or a model is saved, their GUIDs are
21
- # renewed.
22
- #
23
- # @example
24
- # model = Sketchup.active_model
25
- # definitions = model.definitions
26
- # definition = definitions.find { |definition| !definition.internal? }
27
- # # true if component matches its external file.
28
- # definition.guid == Sketchup::Skp.read_guid(definition.path)
29
- #
30
- # @param [String] filepath
31
- #
32
- # @raise [ArgumentError] if the file is missing or is not a SketchUp model.
33
- #
34
- # @return [String]
35
- #
36
- # @version SketchUp 2021.0
37
- def self.read_guid(filepath)
38
- end
39
-
40
- end
1
+ # Copyright:: Copyright 2026 Trimble Inc.
2
+ # License:: The MIT License (MIT)
3
+
4
+ # The {Sketchup::Skp} module is used to read metadata from external SketchUp
5
+ # files without loading the whole file.
6
+ #
7
+ # @version SketchUp 2021.0
8
+ module Sketchup::Skp
9
+
10
+ # Class Methods
11
+
12
+ # The {.read_guid} method is used to read the GUID, globally unique identifier,
13
+ # for an external model.
14
+ #
15
+ # In SketchUp, GUIDs are used to test if {Sketchup::ComponentDefinition}s and
16
+ # {Sketchup::Model}s match (a component being an embedded model).
17
+ # When you insert a component to a model, its GUID is compared to existing
18
+ # component definitions in that model, and if there is a match the existing
19
+ # component definition is re-used rather than a duplicate being added.
20
+ # When a component definition is modified or a model is saved, their GUIDs are
21
+ # renewed.
22
+ #
23
+ # @example
24
+ # model = Sketchup.active_model
25
+ # definitions = model.definitions
26
+ # definition = definitions.find { |definition| !definition.internal? }
27
+ # # true if component matches its external file.
28
+ # definition.guid == Sketchup::Skp.read_guid(definition.path)
29
+ #
30
+ # @param [String] filepath
31
+ #
32
+ # @raise [ArgumentError] if the file is missing or is not a SketchUp model.
33
+ #
34
+ # @return [String]
35
+ #
36
+ # @version SketchUp 2021.0
37
+ def self.read_guid(filepath)
38
+ end
39
+
40
+ end
@@ -0,0 +1,125 @@
1
+ # Copyright:: Copyright 2026 Trimble Inc.
2
+ # License:: The MIT License (MIT)
3
+
4
+ # A Snap is a custom grip used by SketchUp's Move tool.
5
+ # Snaps can be added at strategic places such as connectors to help
6
+ # assembling objects.
7
+ #
8
+ # rdoc-image:../images/snaps.png
9
+ #
10
+ # {#direction} is the direction a snap is "pointing". This can be thought of as
11
+ # the normal direction of the snap. It can also be thought of as the direction
12
+ # you move an object when plugging it into another object, e.g. inserting a
13
+ # power coord.
14
+ #
15
+ # {#up} controls the rotation around the Snap's axis.
16
+ #
17
+ # When two objects are snapped together, the Snaps have opposite
18
+ # {#direction} vectors but matching {#up} vectors.
19
+ #
20
+ # @example
21
+ # # Copy all snaps from source group/component to the corresponding
22
+ # # location in a target group/component, as if the objects have
23
+ # # have been snapped together.
24
+ # #
25
+ # # @param [Sketchup::Group, Sketchup::ComponentInstance] source
26
+ # # @param [Sketchup::Group, Sketchup::ComponentInstance] target
27
+ # def copy_snap(source, target)
28
+ # # Transformation for going from the coordinate system of the source to
29
+ # # that of the target.
30
+ # transformation =
31
+ # target.transformation.inverse * source.transformation
32
+ #
33
+ # source.definition.entities.grep(Sketchup::Snap) do |source_snap|
34
+ # # Transform position and orientation between local coordinate systems.
35
+ # position = source_snap.position.transform(transformation)
36
+ # # Direction vector is reversed between two connected snaps;
37
+ # # the snaps point "into" each other.
38
+ # direction = source_snap.direction.transform(transformation).reverse
39
+ # # Up vector is aligned between two connected snaps.
40
+ # up = source_snap.up.transform(transformation)
41
+ #
42
+ # target.entities.add_snap(position, direction, up)
43
+ # end
44
+ # end
45
+ #
46
+ # @version SketchUp 2025.0
47
+ class Sketchup::Snap < Sketchup::Drawingelement
48
+
49
+ # Instance Methods
50
+
51
+ # The {#direction} method is used to get the direction this Snap is "pointing".
52
+ #
53
+ # When two Snaps are snapped into each other, they have the opposite {#direction}.
54
+ #
55
+ # @example
56
+ # snap = Sketchup.active_model.entities.add_snap(ORIGIN)
57
+ # direction = snap.direction
58
+ #
59
+ # @return [Geom::Vector3d]
60
+ #
61
+ # @version SketchUp 2025.0
62
+ def direction
63
+ end
64
+
65
+ # The {#position} method is used to get the position of this Snap.
66
+ #
67
+ # @example
68
+ # snap = Sketchup.active_model.entities.add_snap(ORIGIN)
69
+ # position = snap.position
70
+ #
71
+ # @return [Geom::Point3d]
72
+ #
73
+ # @version SketchUp 2025.0
74
+ def position
75
+ end
76
+
77
+ # The {#set} method is used to move and/or reorient a Snap.
78
+ #
79
+ # @example
80
+ # snap = Sketchup.active_model.entities.add_snap(ORIGIN)
81
+ # snap.set(Geom::Point3d.new(1.m, 0, 0))
82
+ #
83
+ # @overload set(position)
84
+ #
85
+ # With only a position provided, the Snap keeps its current orientation.
86
+ # @param [Geom::Point3d] position
87
+ #
88
+ # @overload set(position, direction)
89
+ #
90
+ # With a position and a direction vector provided, but no up vector, SketchUp
91
+ # tries to keep the Snap upright.
92
+ # @param [Geom::Point3d] position
93
+ # @param [Geom::Vector3d] direction
94
+ #
95
+ # @overload set(position, direction, up)
96
+ #
97
+ # @param [Geom::Point3d] position
98
+ # @param [Geom::Vector3d] direction
99
+ # @param [Geom::Vector3d] up
100
+ #
101
+ # @raise ArgumentError if +direction+ and +up+ are parallel.
102
+ #
103
+ # @return [Sketchup::Snap] self
104
+ #
105
+ # @version SketchUp 2025.0
106
+ def set(*args)
107
+ end
108
+
109
+ # The {#up} method is used to get a vector representing the rotation of this
110
+ # Snap along its axis.
111
+ #
112
+ # When two Snaps are snapped into each other, they have the same aligned {#up}
113
+ # direction.
114
+ #
115
+ # @example
116
+ # snap = Sketchup.active_model.entities.add_snap(ORIGIN)
117
+ # up = snap.up
118
+ #
119
+ # @return [Geom::Vector3d]
120
+ #
121
+ # @version SketchUp 2025.0
122
+ def up
123
+ end
124
+
125
+ end
@@ -1,69 +1,88 @@
1
- # Copyright:: Copyright 2023 Trimble Inc.
2
- # License:: The MIT License (MIT)
3
-
4
- # The Style class contains methods for modifying information about a specific
5
- # style. Styles are a collection of display settings that tell SketchUp how to
6
- # draw the model.
7
- #
8
- # @example
9
- # styles = Sketchup.active_model.styles
10
- # puts "Your first style is named #{styles.first.name}"
11
- #
12
- # @version SketchUp 6.0
13
- class Sketchup::Style < Sketchup::Entity
14
-
15
- # Instance Methods
16
-
17
- # The {#description} method gets the description for a {Sketchup::Style}.
18
- #
19
- # @example
20
- # styles = Sketchup.active_model.styles
21
- # style = styles.first
22
- # puts "Your first style description is: #{style.description}"
23
- #
24
- # @return [String] description
25
- #
26
- # @version SketchUp 6.0
27
- def description
28
- end
29
-
30
- # The {#description=} method sets the description for a {Sketchup::Style}.
31
- #
32
- # @example
33
- # styles = Sketchup.active_model.styles
34
- # style = styles.first
35
- # style.description = "My new style description."
36
- #
37
- # @param [String] description
38
- #
39
- # @version SketchUp 6.0
40
- def description=(description)
41
- end
42
-
43
- # The {#name} method gets the name for a {Sketchup::Style}.
44
- #
45
- # @example
46
- # styles = Sketchup.active_model.styles
47
- # style = styles.first
48
- # name = style.name
49
- #
50
- # @return [String]
51
- #
52
- # @version SketchUp 6.0
53
- def name
54
- end
55
-
56
- # The {#name=} method sets the name for a {Sketchup::Style}.
57
- #
58
- # @example
59
- # styles = Sketchup.active_model.styles
60
- # style = styles.first
61
- # style.name = 'My Very Own Style'
62
- #
63
- # @param [String] name
64
- #
65
- # @version SketchUp 6.0
66
- def name=(name)
67
- end
68
-
69
- end
1
+ # Copyright:: Copyright 2026 Trimble Inc.
2
+ # License:: The MIT License (MIT)
3
+
4
+ # The Style class contains methods for modifying information about a specific
5
+ # style. Styles are a collection of display settings that tell SketchUp how to
6
+ # draw the model.
7
+ #
8
+ # In SketchUp, there are two important style objects in a model:
9
+ # The {Sketchup::Styles#selected_style} is the style currently selected in the Styles Browser.
10
+ # The {Sketchup::Styles#active_style} is a temporary copy of the selected style that allows
11
+ # editing without committing changes. Changes to the active style are not saved unless you call
12
+ # {Sketchup::Styles#update_selected_style}.
13
+ #
14
+ # @example
15
+ # styles = Sketchup.active_model.styles
16
+ # puts "Your first style is named #{styles.first.name}"
17
+ #
18
+ # @version SketchUp 6.0
19
+ class Sketchup::Style < Sketchup::Entity
20
+
21
+ # Instance Methods
22
+
23
+ # The {#description} method gets the description for a {Sketchup::Style}.
24
+ #
25
+ # @example
26
+ # styles = Sketchup.active_model.styles
27
+ # style = styles.first
28
+ # puts "Your first style description is: #{style.description}"
29
+ #
30
+ # @return [String] description
31
+ #
32
+ # @version SketchUp 6.0
33
+ def description
34
+ end
35
+
36
+ # The {#description=} method sets the description for a {Sketchup::Style}.
37
+ #
38
+ # @example
39
+ # styles = Sketchup.active_model.styles
40
+ # style = styles.first
41
+ # style.description = "My new style description."
42
+ #
43
+ # @param [String] description
44
+ #
45
+ # @version SketchUp 6.0
46
+ def description=(description)
47
+ end
48
+
49
+ # The {#name} method gets the name for a {Sketchup::Style}.
50
+ #
51
+ # @example
52
+ # styles = Sketchup.active_model.styles
53
+ # style = styles.first
54
+ # name = style.name
55
+ #
56
+ # @return [String]
57
+ #
58
+ # @version SketchUp 6.0
59
+ def name
60
+ end
61
+
62
+ # The {#name=} method sets the name for a {Sketchup::Style}.
63
+ #
64
+ # @example
65
+ # styles = Sketchup.active_model.styles
66
+ # style = styles.first
67
+ # style.name = 'My Very Own Style'
68
+ #
69
+ # @param [String] name
70
+ #
71
+ # @version SketchUp 6.0
72
+ def name=(name)
73
+ end
74
+
75
+ # The {#path} method gets the file path the {Sketchup::Style} was loaded from.
76
+ #
77
+ # @example
78
+ # styles = Sketchup.active_model.styles
79
+ # style = styles.first
80
+ # name = style.path
81
+ #
82
+ # @return [String] path The file path the style was loaded from.
83
+ #
84
+ # @version SketchUp 2025.0
85
+ def path
86
+ end
87
+
88
+ end