sketchup-api-stubs 0.7.9 → 0.7.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (154) hide show
  1. checksums.yaml +4 -4
  2. data/lib/sketchup-api-stubs/sketchup.rb +151 -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 +172 -172
  6. data/lib/sketchup-api-stubs/stubs/Geom/LatLong.rb +126 -126
  7. data/lib/sketchup-api-stubs/stubs/Geom/OrientedBounds2d.rb +102 -102
  8. data/lib/sketchup-api-stubs/stubs/Geom/Point2d.rb +400 -400
  9. data/lib/sketchup-api-stubs/stubs/Geom/Point3d.rb +661 -661
  10. data/lib/sketchup-api-stubs/stubs/Geom/PolygonMesh.rb +509 -509
  11. data/lib/sketchup-api-stubs/stubs/Geom/Transformation.rb +476 -476
  12. data/lib/sketchup-api-stubs/stubs/Geom/Transformation2d.rb +263 -263
  13. data/lib/sketchup-api-stubs/stubs/Geom/UTM.rb +141 -141
  14. data/lib/sketchup-api-stubs/stubs/Geom/Vector2d.rb +522 -522
  15. data/lib/sketchup-api-stubs/stubs/Geom/Vector3d.rb +693 -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 +747 -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/Document.rb +569 -517
  23. data/lib/sketchup-api-stubs/stubs/Layout/Ellipse.rb +29 -29
  24. data/lib/sketchup-api-stubs/stubs/Layout/Entities.rb +148 -148
  25. data/lib/sketchup-api-stubs/stubs/Layout/Entity.rb +356 -353
  26. data/lib/sketchup-api-stubs/stubs/Layout/FormattedText.rb +354 -354
  27. data/lib/sketchup-api-stubs/stubs/Layout/Grid.rb +311 -311
  28. data/lib/sketchup-api-stubs/stubs/Layout/Group.rb +261 -261
  29. data/lib/sketchup-api-stubs/stubs/Layout/Image.rb +91 -91
  30. data/lib/sketchup-api-stubs/stubs/Layout/Label.rb +370 -370
  31. data/lib/sketchup-api-stubs/stubs/Layout/Layer.rb +218 -218
  32. data/lib/sketchup-api-stubs/stubs/Layout/LayerInstance.rb +128 -128
  33. data/lib/sketchup-api-stubs/stubs/Layout/Layers.rb +225 -225
  34. data/lib/sketchup-api-stubs/stubs/Layout/LinearDimension.rb +567 -567
  35. data/lib/sketchup-api-stubs/stubs/Layout/LockedEntityError.rb +10 -10
  36. data/lib/sketchup-api-stubs/stubs/Layout/LockedLayerError.rb +11 -11
  37. data/lib/sketchup-api-stubs/stubs/Layout/Page.rb +183 -183
  38. data/lib/sketchup-api-stubs/stubs/Layout/PageInfo.rb +459 -387
  39. data/lib/sketchup-api-stubs/stubs/Layout/Pages.rb +209 -209
  40. data/lib/sketchup-api-stubs/stubs/Layout/Path.rb +344 -344
  41. data/lib/sketchup-api-stubs/stubs/Layout/Rectangle.rb +174 -174
  42. data/lib/sketchup-api-stubs/stubs/Layout/ReferenceEntity.rb +82 -82
  43. data/lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb +714 -692
  44. data/lib/sketchup-api-stubs/stubs/Layout/Style.rb +1519 -1519
  45. data/lib/sketchup-api-stubs/stubs/Layout/Table.rb +290 -290
  46. data/lib/sketchup-api-stubs/stubs/Layout/TableCell.rb +149 -149
  47. data/lib/sketchup-api-stubs/stubs/Layout/TableColumn.rb +139 -139
  48. data/lib/sketchup-api-stubs/stubs/Layout/TableRow.rb +135 -135
  49. data/lib/sketchup-api-stubs/stubs/Layout.rb +25 -25
  50. data/lib/sketchup-api-stubs/stubs/Length.rb +278 -278
  51. data/lib/sketchup-api-stubs/stubs/Numeric.rb +249 -249
  52. data/lib/sketchup-api-stubs/stubs/Sketchup/Animation.rb +144 -144
  53. data/lib/sketchup-api-stubs/stubs/Sketchup/AppObserver.rb +169 -169
  54. data/lib/sketchup-api-stubs/stubs/Sketchup/ArcCurve.rb +226 -209
  55. data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionaries.rb +150 -150
  56. data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionary.rb +281 -281
  57. data/lib/sketchup-api-stubs/stubs/Sketchup/Axes.rb +149 -149
  58. data/lib/sketchup-api-stubs/stubs/Sketchup/Behavior.rb +302 -302
  59. data/lib/sketchup-api-stubs/stubs/Sketchup/Camera.rb +478 -478
  60. data/lib/sketchup-api-stubs/stubs/Sketchup/ClassificationSchema.rb +63 -63
  61. data/lib/sketchup-api-stubs/stubs/Sketchup/Classifications.rb +121 -121
  62. data/lib/sketchup-api-stubs/stubs/Sketchup/Color.rb +294 -294
  63. data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentDefinition.rb +659 -659
  64. data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentInstance.rb +593 -593
  65. data/lib/sketchup-api-stubs/stubs/Sketchup/Console.rb +76 -76
  66. data/lib/sketchup-api-stubs/stubs/Sketchup/ConstructionLine.rb +257 -257
  67. data/lib/sketchup-api-stubs/stubs/Sketchup/ConstructionPoint.rb +32 -32
  68. data/lib/sketchup-api-stubs/stubs/Sketchup/Curve.rb +201 -201
  69. data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionList.rb +449 -449
  70. data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionObserver.rb +74 -74
  71. data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionsObserver.rb +104 -104
  72. data/lib/sketchup-api-stubs/stubs/Sketchup/Dimension.rb +165 -165
  73. data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionLinear.rb +306 -306
  74. data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionObserver.rb +42 -42
  75. data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionRadial.rb +87 -87
  76. data/lib/sketchup-api-stubs/stubs/Sketchup/Drawingelement.rb +406 -406
  77. data/lib/sketchup-api-stubs/stubs/Sketchup/Edge.rb +397 -397
  78. data/lib/sketchup-api-stubs/stubs/Sketchup/EdgeUse.rb +211 -211
  79. data/lib/sketchup-api-stubs/stubs/Sketchup/Entities.rb +1242 -1239
  80. data/lib/sketchup-api-stubs/stubs/Sketchup/EntitiesBuilder.rb +261 -261
  81. data/lib/sketchup-api-stubs/stubs/Sketchup/EntitiesObserver.rb +127 -127
  82. data/lib/sketchup-api-stubs/stubs/Sketchup/Entity.rb +519 -545
  83. data/lib/sketchup-api-stubs/stubs/Sketchup/EntityObserver.rb +60 -60
  84. data/lib/sketchup-api-stubs/stubs/Sketchup/ExtensionsManager.rb +125 -125
  85. data/lib/sketchup-api-stubs/stubs/Sketchup/Face.rb +937 -937
  86. data/lib/sketchup-api-stubs/stubs/Sketchup/FrameChangeObserver.rb +102 -102
  87. data/lib/sketchup-api-stubs/stubs/Sketchup/Group.rb +750 -750
  88. data/lib/sketchup-api-stubs/stubs/Sketchup/Http/Request.rb +282 -282
  89. data/lib/sketchup-api-stubs/stubs/Sketchup/Http/Response.rb +62 -62
  90. data/lib/sketchup-api-stubs/stubs/Sketchup/Http.rb +27 -27
  91. data/lib/sketchup-api-stubs/stubs/Sketchup/Image.rb +468 -468
  92. data/lib/sketchup-api-stubs/stubs/Sketchup/ImageRep.rb +266 -266
  93. data/lib/sketchup-api-stubs/stubs/Sketchup/Importer.rb +189 -189
  94. data/lib/sketchup-api-stubs/stubs/Sketchup/InputPoint.rb +406 -406
  95. data/lib/sketchup-api-stubs/stubs/Sketchup/InstanceObserver.rb +84 -84
  96. data/lib/sketchup-api-stubs/stubs/Sketchup/InstancePath.rb +306 -306
  97. data/lib/sketchup-api-stubs/stubs/Sketchup/Layer.rb +326 -326
  98. data/lib/sketchup-api-stubs/stubs/Sketchup/LayerFolder.rb +422 -422
  99. data/lib/sketchup-api-stubs/stubs/Sketchup/Layers.rb +427 -427
  100. data/lib/sketchup-api-stubs/stubs/Sketchup/LayersObserver.rb +249 -249
  101. data/lib/sketchup-api-stubs/stubs/Sketchup/Licensing/ExtensionLicense.rb +86 -86
  102. data/lib/sketchup-api-stubs/stubs/Sketchup/Licensing.rb +48 -48
  103. data/lib/sketchup-api-stubs/stubs/Sketchup/LineStyle.rb +24 -24
  104. data/lib/sketchup-api-stubs/stubs/Sketchup/LineStyles.rb +114 -114
  105. data/lib/sketchup-api-stubs/stubs/Sketchup/Loop.rb +137 -137
  106. data/lib/sketchup-api-stubs/stubs/Sketchup/Material.rb +414 -414
  107. data/lib/sketchup-api-stubs/stubs/Sketchup/Materials.rb +317 -317
  108. data/lib/sketchup-api-stubs/stubs/Sketchup/MaterialsObserver.rb +142 -142
  109. data/lib/sketchup-api-stubs/stubs/Sketchup/Menu.rb +93 -93
  110. data/lib/sketchup-api-stubs/stubs/Sketchup/Model.rb +1656 -1652
  111. data/lib/sketchup-api-stubs/stubs/Sketchup/ModelObserver.rb +357 -357
  112. data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsManager.rb +130 -130
  113. data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProvider.rb +271 -271
  114. data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProviderObserver.rb +58 -58
  115. data/lib/sketchup-api-stubs/stubs/Sketchup/Overlay.rb +490 -490
  116. data/lib/sketchup-api-stubs/stubs/Sketchup/OverlaysManager.rb +116 -116
  117. data/lib/sketchup-api-stubs/stubs/Sketchup/Page.rb +797 -797
  118. data/lib/sketchup-api-stubs/stubs/Sketchup/Pages.rb +361 -361
  119. data/lib/sketchup-api-stubs/stubs/Sketchup/PagesObserver.rb +77 -77
  120. data/lib/sketchup-api-stubs/stubs/Sketchup/PickHelper.rb +480 -478
  121. data/lib/sketchup-api-stubs/stubs/Sketchup/RegionalSettings.rb +43 -43
  122. data/lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb +373 -361
  123. data/lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptionsObserver.rb +45 -45
  124. data/lib/sketchup-api-stubs/stubs/Sketchup/SectionPlane.rb +150 -150
  125. data/lib/sketchup-api-stubs/stubs/Sketchup/Selection.rb +458 -458
  126. data/lib/sketchup-api-stubs/stubs/Sketchup/SelectionObserver.rb +115 -115
  127. data/lib/sketchup-api-stubs/stubs/Sketchup/Set.rb +212 -212
  128. data/lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfo.rb +255 -255
  129. data/lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfoObserver.rb +59 -59
  130. data/lib/sketchup-api-stubs/stubs/Sketchup/Skp.rb +40 -40
  131. data/lib/sketchup-api-stubs/stubs/Sketchup/Style.rb +69 -69
  132. data/lib/sketchup-api-stubs/stubs/Sketchup/Styles.rb +217 -217
  133. data/lib/sketchup-api-stubs/stubs/Sketchup/Text.rb +262 -262
  134. data/lib/sketchup-api-stubs/stubs/Sketchup/Texture.rb +217 -217
  135. data/lib/sketchup-api-stubs/stubs/Sketchup/TextureWriter.rb +237 -237
  136. data/lib/sketchup-api-stubs/stubs/Sketchup/Tool.rb +834 -834
  137. data/lib/sketchup-api-stubs/stubs/Sketchup/Tools.rb +132 -132
  138. data/lib/sketchup-api-stubs/stubs/Sketchup/ToolsObserver.rb +156 -156
  139. data/lib/sketchup-api-stubs/stubs/Sketchup/UVHelper.rb +75 -75
  140. data/lib/sketchup-api-stubs/stubs/Sketchup/Vertex.rb +142 -142
  141. data/lib/sketchup-api-stubs/stubs/Sketchup/View.rb +1329 -1311
  142. data/lib/sketchup-api-stubs/stubs/Sketchup/ViewObserver.rb +45 -45
  143. data/lib/sketchup-api-stubs/stubs/Sketchup.rb +1394 -1377
  144. data/lib/sketchup-api-stubs/stubs/SketchupExtension.rb +353 -353
  145. data/lib/sketchup-api-stubs/stubs/String.rb +24 -24
  146. data/lib/sketchup-api-stubs/stubs/UI/Command.rb +387 -389
  147. data/lib/sketchup-api-stubs/stubs/UI/HtmlDialog.rb +505 -494
  148. data/lib/sketchup-api-stubs/stubs/UI/Notification.rb +269 -269
  149. data/lib/sketchup-api-stubs/stubs/UI/Toolbar.rb +241 -241
  150. data/lib/sketchup-api-stubs/stubs/UI/WebDialog.rb +633 -635
  151. data/lib/sketchup-api-stubs/stubs/UI.rb +728 -683
  152. data/lib/sketchup-api-stubs/stubs/_top_level.rb +303 -303
  153. data/lib/sketchup-api-stubs.rb +1 -1
  154. metadata +3 -3
@@ -1,517 +1,569 @@
1
- # Copyright:: Copyright 2023 Trimble Inc.
2
- # License:: The MIT License (MIT)
3
-
4
- # This is the interface to a LayOut document. A {Layout::Document} is the 2D
5
- # drawing that the user is working with, and it serves as the "entry point" for
6
- # most Ruby API interactions. The {Layout::Document.open} method gives you a
7
- # handle to a {Layout::Document}, and from there you can use the
8
- # document-level methods to start getting information and making changes.
9
- #
10
- # @example
11
- # # Grab a handle to an existing LayOut document.
12
- # doc = Layout::Document.open("C:/path/to/document.layout")
13
- #
14
- # # Grab other handles to commonly used collections inside the model.
15
- # layers = doc.layers
16
- # pages = doc.pages
17
- # entities = doc.shared_entities
18
- #
19
- # # Now that we have our handles, we can start pulling objects and making
20
- # # method calls that are useful.
21
- # first_entity = entities[0]
22
- #
23
- # number_pages = pages.count
24
- #
25
- # @version LayOut 2018
26
- class Layout::Document
27
-
28
- # Constants
29
-
30
- DECIMAL_CENTIMETERS = nil # Stub value.
31
- DECIMAL_FEET = nil # Stub value.
32
- DECIMAL_INCHES = nil # Stub value.
33
- DECIMAL_METERS = nil # Stub value.
34
- DECIMAL_MILLIMETERS = nil # Stub value.
35
- DECIMAL_POINTS = nil # Stub value.
36
-
37
- FRACTIONAL_INCHES = nil # Stub value.
38
-
39
- VERSION_1 = nil # Stub value.
40
- VERSION_2 = nil # Stub value.
41
- VERSION_2013 = nil # Stub value.
42
- VERSION_2014 = nil # Stub value.
43
- VERSION_2015 = nil # Stub value.
44
- VERSION_2016 = nil # Stub value.
45
- VERSION_2017 = nil # Stub value.
46
- VERSION_2018 = nil # Stub value.
47
- VERSION_2019 = nil # Stub value.
48
- VERSION_2020 = nil # Stub value.
49
- VERSION_2021 = nil # Stub value.
50
- VERSION_2022 = nil # Stub value.
51
- VERSION_2023 = nil # Stub value.
52
- VERSION_3 = nil # Stub value.
53
- VERSION_CURRENT = nil # Stub value.
54
-
55
- # Class Methods
56
-
57
- # The {.open} method creates a new {Layout::Document} by loading an existing
58
- # .layout file.
59
- #
60
- # @example
61
- # filename = File.join(ENV['Home'], 'Desktop', 'template.layout')
62
- # doc = Layout::Document.open(filename)
63
- #
64
- # @param [String] path
65
- # The path to the .layout file on disk.
66
- #
67
- # @raise [ArgumentError] if the file does not exist
68
- #
69
- # @return [Layout::Document] The {Layout::Document} created from the .layout
70
- # file.
71
- #
72
- # @version LayOut 2018
73
- def self.open(path)
74
- end
75
-
76
- # Instance Methods
77
-
78
- # The {#==} method checks to see if the two {Layout::Document}s are equal.
79
- # This checks whether the Ruby Objects are pointing to the same internal
80
- # object.
81
- #
82
- # @example
83
- # doc = Layout::Document.open("C:/path/to/document.layout")
84
- # document = doc.pages.first.document
85
- # doc == document
86
- #
87
- # @param [Layout::Document] other
88
- #
89
- # @return [Boolean]
90
- #
91
- # @version LayOut 2018
92
- def ==(other)
93
- end
94
-
95
- # The {#add_entity} method adds an {Layout::Entity} to the {Layout::Document}
96
- # and places it on the given {Layout::Layer} and {Layout::Page}. If layer is a
97
- # shared {Layout::Layer} then page may be ommitted. The {Layout::Entity} must
98
- # not already belong to a {Layout::Document}. If the {Layout::Entity} is a
99
- # {Layout::Group}, then the {Layout::Group} along with all of its children will
100
- # be added to the {Layout::Document}.
101
- #
102
- # @example
103
- # doc = Layout::Document.open("C:/path/to/document.layout")
104
- # rect = Layout::Rectangle.new([[1, 1], [2, 2]])
105
- # all_layers = doc.layers
106
- # all_pages = doc.pages
107
- # doc.add_entity(rect, all_layers.first, all_pages.first)
108
- #
109
- # @overload add_entity(entity, layer, page)
110
- #
111
- # @param [Layout::Entity] entity The {Layout::Entity} to be added
112
- # @param [Layout::Layer] layer The {Layout::Layer} to add the
113
- # {Layout::Entity} to
114
- # @param [Layout::Page] page The {Layout::Page} to add the {Layout::Entity}
115
- # to
116
- #
117
- # @overload add_entity(entity, layer)
118
- #
119
- # @param [Layout::Entity] entity The {Layout::Entity} to be added
120
- # @param [Layout::Layer] layer The shared {Layout::Layer} to add the
121
- # {Layout::Entity} to
122
- #
123
- # @raise [ArgumentError] if no {Layout::Page} is passed in and layer is
124
- # non-shared
125
- #
126
- # @raise [ArgumentError] if page does not belong to the {Layout::Document}
127
- #
128
- # @raise [ArgumentError] if layer does not belong to the {Layout::Document}
129
- #
130
- # @raise [ArgumentError] if entity already belongs to a {Layout::Document}
131
- #
132
- # @version LayOut 2018
133
- def add_entity(*args)
134
- end
135
-
136
- # The {#auto_text_definitions} method returns an array of
137
- # {Layout::AutoTextDefinition}'s in the {Layout::Document}.
138
- #
139
- # @example
140
- # doc = Layout::Document.open("C:/path/to/document.layout")
141
- # defs = doc.auto_text_definitions
142
- #
143
- # @return [Layout::AutoTextDefinitions]
144
- #
145
- # @version LayOut 2018
146
- def auto_text_definitions
147
- end
148
-
149
- # The {#export} method exports the {Layout::Document} to a given file format.
150
- # It knows which format to export based on the file extension you place on the
151
- # file name. For example, a filename of "thing.pdf" will export a PDF file,
152
- # whereas "thing.png" will export a set of PNG images.
153
- #
154
- # For LayOut version 2020.1, valid extensions include .pdf, .jpg, and .png.
155
- #
156
- # @example PDF Export Examples
157
- # doc = Layout::Document.open("c:/path/to/document.layout")
158
- #
159
- # # Export pdf file on a PC, with default settings.
160
- # status = doc.export("c:/my_export.pdf")
161
- #
162
- # # Export pages one through three at high quality, compressing jpeg images
163
- # # at 0.75 compression quality (valid range is 0.0 - 1.0). Note that the
164
- # # first page of a {Layout::Document} is index 0.
165
- # options = { start_page: 1,
166
- # end_page: 3,
167
- # output_resolution: Layout::PageInfo::RESOLUTION_HIGH,
168
- # compress_images: TRUE,
169
- # compress_quality: 0.75 }
170
- #
171
- # status = doc.export("c:/my_export.pdf", options)
172
- #
173
- # @example Image Set Export Examples
174
- # doc = Layout::Document.open("c:/path/to/document.layout")
175
- #
176
- # # Export png files on macOS, with default settings.
177
- # status = doc.export('/Users/username/Desktop/pngs/page.png')
178
- #
179
- # # Export pages one through three at 300 dpi as JPGs.
180
- # options = { start_page: 1,
181
- # end_page: 3,
182
- # dpi: 300 }
183
- # status = doc.export('c:/page.jpg', options)
184
- #
185
- # @param [String] file_path
186
- # The file or image set to create. The directory
187
- # path must already exist. The path must include the file extension.
188
- #
189
- # @param [Hash, nil] options
190
- # An optional hash of settings for the export.
191
- #
192
- # @raise [TypeError] if an options value is the wrong type
193
- #
194
- # @raise [RangeError] if an options value is out of range
195
- #
196
- # @raise [ArgumentError] if the full file path does not exist
197
- #
198
- # @raise [ArgumentError] if the specified file type is missing or not supported
199
- #
200
- # @version LayOut 2020.1
201
- def export(file_path, options = nil)
202
- end
203
-
204
- # The {#grid} method returns the {Layout::Grid} for a {Layout::Document}.
205
- #
206
- # @example
207
- # doc = Layout::Document.open("C:/path/to/document.layout")
208
- # grid = doc.grid
209
- #
210
- # @return [Layout::Grid]
211
- #
212
- # @version LayOut 2018
213
- def grid
214
- end
215
-
216
- # The {#grid_snap_enabled=} method sets whether or not grid snap is enabled in
217
- # the {Layout::Document}.
218
- #
219
- # @example
220
- # doc = Layout::Document.open("C:/path/to/document.layout")
221
- # doc.grid_snap_enabled = true
222
- #
223
- # @param [Boolean] enabled
224
- # +true+ for enabled +false+ for disabled
225
- #
226
- # @version LayOut 2018
227
- def grid_snap_enabled=(enabled)
228
- end
229
-
230
- # The {#grid_snap_enabled?} method returns whether or not grid snap is enabled
231
- # in the {Layout::Document}.
232
- #
233
- # @example
234
- # doc = Layout::Document.open("C:/path/to/document.layout")
235
- # enabled = doc.grid_snap_enabled?
236
- #
237
- # @return [Boolean]
238
- #
239
- # @version LayOut 2018
240
- def grid_snap_enabled?
241
- end
242
-
243
- # The {#initialize} method creates a new {Layout::Document}. Passing a path to
244
- # an existing {Layout::Document} will use that file as a template. The new
245
- # {Layout::Document} won't have a path until it is saved for the first time.
246
- #
247
- # @example
248
- # doc = Layout::Document.new
249
- # doc2 = Layout::Document.new("/path/to/template.layout")
250
- #
251
- # @overload initialize
252
- #
253
- # @return [Layout::Document] an empty {Layout::Document} with one
254
- # {Layout::Layer} and one {Layout::Page}
255
- #
256
- # @overload initialize(template_path)
257
- #
258
- # @param [String] template_path The path to the {Layout::Document} to use as
259
- # a template
260
- # @return [Layout::Document] an unsaved {Layout::Document} based on the
261
- # template
262
- #
263
- # @raise [RuntimeError] if there was an error reading the template file
264
- #
265
- # @raise [ArgumentError] if the template file could not be found
266
- #
267
- # @version LayOut 2018
268
- def initialize(*args)
269
- end
270
-
271
- # The {#layers} method returns the {Layout::Layers} of the {Layout::Document}.
272
- #
273
- # @example
274
- # doc = Layout::Document.open("C:/path/to/document.layout")
275
- # layers = doc.layers
276
- #
277
- # @return [Layout::Layers]
278
- #
279
- # @version LayOut 2018
280
- def layers
281
- end
282
-
283
- # The {#object_snap_enabled=} method enables or disables inference in the
284
- # {Layout::Document}.
285
- #
286
- # @example
287
- # doc = Layout::Document.open("C:/path/to/document.layout")
288
- # doc.object_snap_enabled = false
289
- #
290
- # @param [Boolean] enabled
291
- # +true+ for enabled +false+ for disabled
292
- #
293
- # @version LayOut 2018
294
- def object_snap_enabled=(enabled)
295
- end
296
-
297
- # The {#object_snap_enabled?} method returns whether or not inference is
298
- # enabled in the {Layout::Document}.
299
- #
300
- # @example
301
- # doc = Layout::Document.open("C:/path/to/document.layout")
302
- # enabled = doc.object_snap_enabled?
303
- #
304
- # @return [Boolean]
305
- #
306
- # @version LayOut 2018
307
- def object_snap_enabled?
308
- end
309
-
310
- # The {#page_info} method returns a reference to the {Layout::PageInfo}
311
- # settings of the {Layout::Document}.
312
- #
313
- # @example
314
- # doc = Layout::Document.open("C:/path/to/document.layout")
315
- # page_info = doc.page_info
316
- #
317
- # @return [Layout::PageInfo]
318
- #
319
- # @version LayOut 2018
320
- def page_info
321
- end
322
-
323
- # The {#pages} method returns the {Layout::Pages} of the {Layout::Document}.
324
- #
325
- #
326
- # @example:
327
- # doc = Layout::Document.open("C:/path/to/document.layout")
328
- # doc_pages = doc.pages
329
- #
330
- # @return [Layout::Pages] The {Layout::Pages} for the {Layout::Document}.
331
- #
332
- # @version LayOut 2018
333
- def pages
334
- end
335
-
336
- # The {#path} method returns the full path of the {Layout::Document} file. An
337
- # empty string is returned for a new {Layout::Document} (one which has not
338
- # been saved and opened).
339
- #
340
- # @example
341
- # doc = Layout::Document.open("C:/path/to/document.layout")
342
- # path = doc.path
343
- #
344
- # @return [String]
345
- #
346
- # @version LayOut 2018
347
- def path
348
- end
349
-
350
- # The {#precision} method returns the precision for the {Layout::Document}.
351
- #
352
- # @example
353
- # doc = Layout::Document.open("C:/path/to/document.layout")
354
- # precision = doc.precision
355
- #
356
- # @return [Float] the number specifying the precision for the
357
- # {Layout::Document}
358
- #
359
- # @version LayOut 2018
360
- def precision
361
- end
362
-
363
- # The {#precision=} method sets the precision for the {Layout::Document}.
364
- #
365
- # @example
366
- # doc = Layout::Document.open("C:/path/to/document.layout")
367
- # doc.precision = 0.0001
368
- #
369
- # @note LayOut only allows for a finite set of precision values for each units
370
- # setting, so it will set the precision to the closest valid setting for the
371
- # specified units. See the "Units" section of LayOut's "Document Setup"
372
- # dialog for a reference of the available precisions for each units setting.
373
- #
374
- # @param [Float] precision
375
- # The double specifying the precision for the
376
- # {Layout::Document}
377
- #
378
- # @version LayOut 2018
379
- def precision=(precision)
380
- end
381
-
382
- # The {#remove_entity} method removes an {Layout::Entity} from the
383
- # {Layout::Document}. If entity is a {Layout::Group}, then the {Layout::Group}
384
- # and all of its children will be removed from the {Layout::Document}.
385
- #
386
- # @example
387
- # doc = Layout::Document.open("C:/path/to/document.layout")
388
- # shared_entities = doc.shared_entities
389
- # # Remove the first entity in the document
390
- # doc.remove_entity(shared_entities.first)
391
- #
392
- # @param [Layout::Entity] entity
393
- # The {Layout::Entity} to be removed
394
- #
395
- # @raise [ArgumentError] if entity does not belong to the {Layout::Document}
396
- #
397
- # @version LayOut 2018
398
- def remove_entity(entity)
399
- end
400
-
401
- # The {#save} method saves the {Layout::Document} to a file at the given path.
402
- # Passing an empty path string will save the {Layout::Document} at its current
403
- # path.
404
- #
405
- # @example
406
- # doc = Layout::Document.open("C:/path/to/document.layout")
407
- # # Save the model using the current Layout format
408
- # path = File.join(ENV['Home'], 'Desktop', 'mydoc.layout')
409
- # status = doc.save(path)
410
- # # Save the document to the current file using the current LayOut format
411
- # status = doc.save
412
- # # Save the document to the current file in LayOut 3 format
413
- # status = doc.save(Layout::Document::VERSION_3)
414
- # # Save the document in LayOut 2013 format
415
- # path = File.join(ENV['Home'], 'Desktop', 'mydoc_v2013.layout')
416
- # status = doc.save(path, Layout::Document::VERSION_2013)
417
- #
418
- # @overload save
419
- #
420
- # @raise [ArgumentError] if the {Layout::Document} hasn't been saved with a
421
- # path yet
422
- #
423
- # @overload save(path, version = Layout::Document::VERSION_CURRENT)
424
- #
425
- # @param [String] path The path to the .layout file on disk.
426
- # @param [Integer] version LayOut file format to save.
427
- #
428
- # @raise [ArgumentError] if version is not a valid version
429
- #
430
- # @raise [ArgumentError] if saving failed. This may be due to the LayOut file
431
- # being open in the LayOut application
432
- #
433
- # @version LayOut 2018
434
- def save(*args)
435
- end
436
-
437
- # The {#shared_entities} method returns the {Layout::Entities}
438
- # that exist on shared {Layout::Layer}s in the {Layout::Document}.
439
- #
440
- # @example
441
- # doc = Layout::Document.open("C:/path/to/document.layout")
442
- # entities = doc.shared_entities
443
- #
444
- # @return [Layout::Entities]
445
- #
446
- # @version LayOut 2018
447
- def shared_entities
448
- end
449
-
450
- # The {#time_created} method returns the time when the {Layout::Document} was
451
- # created.
452
- #
453
- # @example
454
- # doc = Layout::Document.open("C:/path/to/document.layout")
455
- # created_time = doc.time_created
456
- #
457
- # @return [Time] time when the {Layout::Document} was created
458
- #
459
- # @version LayOut 2018
460
- def time_created
461
- end
462
-
463
- # The {#time_modified} method returns the last time the {Layout::Document} was
464
- # modified.
465
- #
466
- # @example
467
- # doc = Layout::Document.open("C:/path/to/document.layout")
468
- # mod_time = doc.time_modified
469
- #
470
- # @return [Time] time when the {Layout::Document} was last modified
471
- #
472
- # @version LayOut 2018
473
- def time_modified
474
- end
475
-
476
- # The {#time_published} method returns the time when the {Layout::Document} was
477
- # published.
478
- #
479
- # @example
480
- # doc = Layout::Document.open("C:/path/to/document.layout")
481
- # pub_time = doc.time_published
482
- #
483
- # @return [Time] time when the {Layout::Document} was published
484
- #
485
- # @version LayOut 2018
486
- def time_published
487
- end
488
-
489
- # The {#units} method returns the units for the {Layout::Document}.
490
- #
491
- # @example
492
- # doc = Layout::Document.open("C:/path/to/document.layout")
493
- # units = doc.units
494
- #
495
- # @return [Integer] The unit format of the {Layout::Document}
496
- #
497
- # @version LayOut 2018
498
- def units
499
- end
500
-
501
- # The {#units=} method sets the units for the {Layout::Document}.
502
- #
503
- # @example
504
- # doc = Layout::Document.open("C:/path/to/document.layout")
505
- # units_format = LAYOUT::DOCUMENT::DECIMAL_MILLIMETERS
506
- # doc.units = units_format
507
- #
508
- # @param [Integer] units_format
509
- # The format of the units in the {Layout::Document}
510
- #
511
- # @raise [ArgumentError] if units format is not a valid format
512
- #
513
- # @version LayOut 2018
514
- def units=(units_format)
515
- end
516
-
517
- end
1
+ # Copyright:: Copyright 2024 Trimble Inc.
2
+ # License:: The MIT License (MIT)
3
+
4
+ # This is the interface to a LayOut document. A {Layout::Document} is the 2D
5
+ # drawing that the user is working with, and it serves as the "entry point" for
6
+ # most Ruby API interactions. The {Layout::Document.open} method gives you a
7
+ # handle to a {Layout::Document}, and from there you can use the
8
+ # document-level methods to start getting information and making changes.
9
+ #
10
+ # @example
11
+ # # Grab a handle to an existing LayOut document.
12
+ # doc = Layout::Document.open("C:/path/to/document.layout")
13
+ #
14
+ # # Grab other handles to commonly used collections inside the model.
15
+ # layers = doc.layers
16
+ # pages = doc.pages
17
+ # entities = doc.shared_entities
18
+ #
19
+ # # Now that we have our handles, we can start pulling objects and making
20
+ # # method calls that are useful.
21
+ # first_entity = entities[0]
22
+ #
23
+ # number_pages = pages.count
24
+ #
25
+ # @version LayOut 2018
26
+ class Layout::Document
27
+
28
+ # Constants
29
+
30
+ DECIMAL_CENTIMETERS = nil # Stub value.
31
+ DECIMAL_FEET = nil # Stub value.
32
+ DECIMAL_INCHES = nil # Stub value.
33
+ DECIMAL_METERS = nil # Stub value.
34
+ DECIMAL_MILLIMETERS = nil # Stub value.
35
+ DECIMAL_POINTS = nil # Stub value.
36
+
37
+ FRACTIONAL_INCHES = nil # Stub value.
38
+
39
+ VERSION_1 = nil # Stub value.
40
+ VERSION_2 = nil # Stub value.
41
+ VERSION_2013 = nil # Stub value.
42
+ VERSION_2014 = nil # Stub value.
43
+ VERSION_2015 = nil # Stub value.
44
+ VERSION_2016 = nil # Stub value.
45
+ VERSION_2017 = nil # Stub value.
46
+ VERSION_2018 = nil # Stub value.
47
+ VERSION_2019 = nil # Stub value.
48
+ VERSION_2020 = nil # Stub value.
49
+ VERSION_2021 = nil # Stub value.
50
+ VERSION_2022 = nil # Stub value.
51
+ VERSION_2023 = nil # Stub value.
52
+ VERSION_3 = nil # Stub value.
53
+ VERSION_CURRENT = nil # Stub value.
54
+
55
+ # Class Methods
56
+
57
+ # The {.open} method creates a new {Layout::Document} by loading an existing
58
+ # .layout file.
59
+ #
60
+ # @example
61
+ # filename = File.join(ENV['Home'], 'Desktop', 'template.layout')
62
+ # doc = Layout::Document.open(filename)
63
+ #
64
+ # @param [String] path
65
+ # The path to the .layout file on disk.
66
+ #
67
+ # @raise [ArgumentError] if the file does not exist
68
+ #
69
+ # @return [Layout::Document] The {Layout::Document} created from the .layout
70
+ # file.
71
+ #
72
+ # @version LayOut 2018
73
+ def self.open(path)
74
+ end
75
+
76
+ # Instance Methods
77
+
78
+ # The {#==} method checks to see if the two {Layout::Document}s are equal.
79
+ # This checks whether the Ruby Objects are pointing to the same internal
80
+ # object.
81
+ #
82
+ # @example
83
+ # doc = Layout::Document.open("C:/path/to/document.layout")
84
+ # document = doc.pages.first.document
85
+ # doc == document
86
+ #
87
+ # @param [Layout::Document] other
88
+ #
89
+ # @return [Boolean]
90
+ #
91
+ # @version LayOut 2018
92
+ def ==(other)
93
+ end
94
+
95
+ # The {#add_entity} method adds an {Layout::Entity} to the {Layout::Document}
96
+ # and places it on the given {Layout::Layer} and {Layout::Page}. If layer is a
97
+ # shared {Layout::Layer} then page may be ommitted. The {Layout::Entity} must
98
+ # not already belong to a {Layout::Document}. If the {Layout::Entity} is a
99
+ # {Layout::Group}, then the {Layout::Group} along with all of its children will
100
+ # be added to the {Layout::Document}.
101
+ #
102
+ # @example
103
+ # doc = Layout::Document.open("C:/path/to/document.layout")
104
+ # rect = Layout::Rectangle.new([[1, 1], [2, 2]])
105
+ # all_layers = doc.layers
106
+ # all_pages = doc.pages
107
+ # doc.add_entity(rect, all_layers.first, all_pages.first)
108
+ #
109
+ # @overload add_entity(entity, layer, page)
110
+ #
111
+ # @param [Layout::Entity] entity The {Layout::Entity} to be added
112
+ # @param [Layout::Layer] layer The {Layout::Layer} to add the
113
+ # {Layout::Entity} to
114
+ # @param [Layout::Page] page The {Layout::Page} to add the {Layout::Entity}
115
+ # to
116
+ #
117
+ # @overload add_entity(entity, layer)
118
+ #
119
+ # @param [Layout::Entity] entity The {Layout::Entity} to be added
120
+ # @param [Layout::Layer] layer The shared {Layout::Layer} to add the
121
+ # {Layout::Entity} to
122
+ #
123
+ # @raise [ArgumentError] if no {Layout::Page} is passed in and layer is
124
+ # non-shared
125
+ #
126
+ # @raise [ArgumentError] if page does not belong to the {Layout::Document}
127
+ #
128
+ # @raise [ArgumentError] if layer does not belong to the {Layout::Document}
129
+ #
130
+ # @raise [ArgumentError] if entity already belongs to a {Layout::Document}
131
+ #
132
+ # @version LayOut 2018
133
+ def add_entity(*args)
134
+ end
135
+
136
+ # The {#auto_text_definitions} method returns an array of
137
+ # {Layout::AutoTextDefinition}'s in the {Layout::Document}.
138
+ #
139
+ # @example
140
+ # doc = Layout::Document.open("C:/path/to/document.layout")
141
+ # defs = doc.auto_text_definitions
142
+ #
143
+ # @return [Layout::AutoTextDefinitions]
144
+ #
145
+ # @version LayOut 2018
146
+ def auto_text_definitions
147
+ end
148
+
149
+ # The {#export} method exports the {Layout::Document} to a given file format.
150
+ # It knows which format to export based on the file extension you place on the
151
+ # file name. For example, a filename of "thing.pdf" will export a PDF file,
152
+ # whereas "thing.png" will export a set of PNG images.
153
+ #
154
+ # For LayOut version 2020.1, valid extensions include .pdf, .jpg, and .png.
155
+ #
156
+ # @example PDF Export Examples
157
+ # doc = Layout::Document.open("c:/path/to/document.layout")
158
+ #
159
+ # # Export pdf file on a PC, with default settings.
160
+ # status = doc.export("c:/my_export.pdf")
161
+ #
162
+ # # Export pages one through three at high quality, compressing jpeg images
163
+ # # at 0.75 compression quality (valid range is 0.0 - 1.0). Note that the
164
+ # # first page of a {Layout::Document} is index 0.
165
+ # options = { start_page: 1,
166
+ # end_page: 3,
167
+ # compress_images: TRUE,
168
+ # compress_quality: 0.75 }
169
+ #
170
+ # status = doc.export("c:/my_export.pdf", options)
171
+ #
172
+ # # Export pages one and three through five. Note that page_range starts at
173
+ # # index 1.
174
+ # # `page_range` support added in LayOut 2024.0.
175
+ # options = { page_range: "1,3-5",
176
+ # compress_images: TRUE,
177
+ # compress_quality: 0.75 }
178
+ #
179
+ # status = doc.export("c:/my_export.pdf", options)
180
+ #
181
+ # @example Image Set Export Examples
182
+ # doc = Layout::Document.open("c:/path/to/document.layout")
183
+ #
184
+ # # Export png files on macOS, with default settings.
185
+ # status = doc.export("/Users/<username>/Desktop/pngs/page.png")
186
+ #
187
+ # # Export pages one through three at 300 dpi as JPGs.
188
+ # options = { start_page: 1,
189
+ # end_page: 3,
190
+ # dpi: 300 }
191
+ # status = doc.export('c:/page.jpg', options)
192
+ #
193
+ # # Export pages one and three through five. Note that page_range starts at
194
+ # # index 1.
195
+ # # `page_range` support added in LayOut 2024.0.
196
+ # options = { page_range: "1,3-5",
197
+ # compress_images: TRUE,
198
+ # compress_quality: 0.75 }
199
+ #
200
+ # status = doc.export("c:/my_export.png", options)
201
+ #
202
+ # @param [String] file_path
203
+ # The file or image set to create. The directory
204
+ # path must already exist. The path must include the file extension.
205
+ #
206
+ # @param [Hash, nil] options
207
+ # An optional hash of settings for the export.
208
+ #
209
+ # @raise [TypeError] if an options value is the wrong type
210
+ #
211
+ # @raise [RangeError] if an options value is out of range
212
+ #
213
+ # @raise [ArgumentError] if the full file path does not exist
214
+ #
215
+ # @raise [ArgumentError] if the specified file type is missing or not supported
216
+ #
217
+ # @version LayOut 2020.1
218
+ def export(file_path, options = nil)
219
+ end
220
+
221
+ # The {#grid} method returns the {Layout::Grid} for a {Layout::Document}.
222
+ #
223
+ # @example
224
+ # doc = Layout::Document.open("C:/path/to/document.layout")
225
+ # grid = doc.grid
226
+ #
227
+ # @return [Layout::Grid]
228
+ #
229
+ # @version LayOut 2018
230
+ def grid
231
+ end
232
+
233
+ # The {#grid_snap_enabled=} method sets whether or not grid snap is enabled in
234
+ # the {Layout::Document}.
235
+ #
236
+ # @example
237
+ # doc = Layout::Document.open("C:/path/to/document.layout")
238
+ # doc.grid_snap_enabled = true
239
+ #
240
+ # @param [Boolean] enabled
241
+ # +true+ for enabled +false+ for disabled
242
+ #
243
+ # @version LayOut 2018
244
+ def grid_snap_enabled=(enabled)
245
+ end
246
+
247
+ # The {#grid_snap_enabled?} method returns whether or not grid snap is enabled
248
+ # in the {Layout::Document}.
249
+ #
250
+ # @example
251
+ # doc = Layout::Document.open("C:/path/to/document.layout")
252
+ # enabled = doc.grid_snap_enabled?
253
+ #
254
+ # @return [Boolean]
255
+ #
256
+ # @version LayOut 2018
257
+ def grid_snap_enabled?
258
+ end
259
+
260
+ # The {#initialize} method creates a new {Layout::Document}. Passing a path to
261
+ # an existing {Layout::Document} will use that file as a template. The new
262
+ # {Layout::Document} won't have a path until it is saved for the first time.
263
+ #
264
+ # @example
265
+ # doc = Layout::Document.new
266
+ # doc2 = Layout::Document.new("/path/to/template.layout")
267
+ #
268
+ # @overload initialize
269
+ #
270
+ # @return [Layout::Document] an empty {Layout::Document} with one
271
+ # {Layout::Layer} and one {Layout::Page}
272
+ #
273
+ # @overload initialize(template_path)
274
+ #
275
+ # @param [String] template_path The path to the {Layout::Document} to use as
276
+ # a template
277
+ # @return [Layout::Document] an unsaved {Layout::Document} based on the
278
+ # template
279
+ #
280
+ # @raise [RuntimeError] if there was an error reading the template file
281
+ #
282
+ # @raise [ArgumentError] if the template file could not be found
283
+ #
284
+ # @version LayOut 2018
285
+ def initialize(*args)
286
+ end
287
+
288
+ # The {#layers} method returns the {Layout::Layers} of the {Layout::Document}.
289
+ #
290
+ # @example
291
+ # doc = Layout::Document.open("C:/path/to/document.layout")
292
+ # layers = doc.layers
293
+ #
294
+ # @return [Layout::Layers]
295
+ #
296
+ # @version LayOut 2018
297
+ def layers
298
+ end
299
+
300
+ # The {#object_snap_enabled=} method enables or disables inference in the
301
+ # {Layout::Document}.
302
+ #
303
+ # @example
304
+ # doc = Layout::Document.open("C:/path/to/document.layout")
305
+ # doc.object_snap_enabled = false
306
+ #
307
+ # @param [Boolean] enabled
308
+ # +true+ for enabled +false+ for disabled
309
+ #
310
+ # @version LayOut 2018
311
+ def object_snap_enabled=(enabled)
312
+ end
313
+
314
+ # The {#object_snap_enabled?} method returns whether or not inference is
315
+ # enabled in the {Layout::Document}.
316
+ #
317
+ # @example
318
+ # doc = Layout::Document.open("C:/path/to/document.layout")
319
+ # enabled = doc.object_snap_enabled?
320
+ #
321
+ # @return [Boolean]
322
+ #
323
+ # @version LayOut 2018
324
+ def object_snap_enabled?
325
+ end
326
+
327
+ # The {#page_info} method returns a reference to the {Layout::PageInfo}
328
+ # settings of the {Layout::Document}.
329
+ #
330
+ # @example
331
+ # doc = Layout::Document.open("C:/path/to/document.layout")
332
+ # page_info = doc.page_info
333
+ #
334
+ # @return [Layout::PageInfo]
335
+ #
336
+ # @version LayOut 2018
337
+ def page_info
338
+ end
339
+
340
+ # The {#pages} method returns the {Layout::Pages} of the {Layout::Document}.
341
+ #
342
+ #
343
+ # @example:
344
+ # doc = Layout::Document.open("C:/path/to/document.layout")
345
+ # doc_pages = doc.pages
346
+ #
347
+ # @return [Layout::Pages] The {Layout::Pages} for the {Layout::Document}.
348
+ #
349
+ # @version LayOut 2018
350
+ def pages
351
+ end
352
+
353
+ # The {#path} method returns the full path of the {Layout::Document} file. An
354
+ # empty string is returned for a new {Layout::Document} (one which has not
355
+ # been saved and opened).
356
+ #
357
+ # @example
358
+ # doc = Layout::Document.open("C:/path/to/document.layout")
359
+ # path = doc.path
360
+ #
361
+ # @return [String]
362
+ #
363
+ # @version LayOut 2018
364
+ def path
365
+ end
366
+
367
+ # The {#precision} method returns the precision for the {Layout::Document}.
368
+ #
369
+ # @example
370
+ # doc = Layout::Document.open("C:/path/to/document.layout")
371
+ # precision = doc.precision
372
+ #
373
+ # @return [Float] the number specifying the precision for the
374
+ # {Layout::Document}
375
+ #
376
+ # @version LayOut 2018
377
+ def precision
378
+ end
379
+
380
+ # The {#precision=} method sets the precision for the {Layout::Document}.
381
+ #
382
+ # @example
383
+ # doc = Layout::Document.open("C:/path/to/document.layout")
384
+ # doc.precision = 0.0001
385
+ #
386
+ # @note LayOut only allows for a finite set of precision values for each units
387
+ # setting, so it will set the precision to the closest valid setting for the
388
+ # specified units. See the "Units" section of LayOut's "Document Setup"
389
+ # dialog for a reference of the available precisions for each units setting.
390
+ #
391
+ # @param [Float] precision
392
+ # The double specifying the precision for the
393
+ # {Layout::Document}
394
+ #
395
+ # @version LayOut 2018
396
+ def precision=(precision)
397
+ end
398
+
399
+ # The {#remove_entity} method removes an {Layout::Entity} from the
400
+ # {Layout::Document}. If entity is a {Layout::Group}, then the {Layout::Group}
401
+ # and all of its children will be removed from the {Layout::Document}.
402
+ #
403
+ # @example
404
+ # doc = Layout::Document.open("C:/path/to/document.layout")
405
+ # shared_entities = doc.shared_entities
406
+ # # Remove the first entity in the document
407
+ # doc.remove_entity(shared_entities.first)
408
+ #
409
+ # @param [Layout::Entity] entity
410
+ # The {Layout::Entity} to be removed
411
+ #
412
+ # @raise [ArgumentError] if entity does not belong to the {Layout::Document}
413
+ #
414
+ # @version LayOut 2018
415
+ def remove_entity(entity)
416
+ end
417
+
418
+ # The {#render_mode_override} method returns the override setting for output render modes
419
+ # of {Layout::SketchUpModel}s in the {Layout::Document}.
420
+ #
421
+ # @example
422
+ # doc = Layout::Document.open("C:/path/to/document.layout")
423
+ # render_mode = doc.render_mode_override
424
+ #
425
+ # @return [Integer]
426
+ #
427
+ # @version LayOut 2023.1
428
+ def render_mode_override
429
+ end
430
+
431
+ # The {#render_mode_override=} method sets the override setting for output render modes
432
+ # of {Layout::SketchUpModel}s in the {Layout::Document}. Setting this to +NO_OVERRIDE+
433
+ # will prevent overriding the individual {Layout::SketchUpModel} render mode setting during
434
+ # export. This override will only affect raster rendered {Layout::SketchUpModel}s, if a
435
+ # viewport is set to vector or hybrid, it will retain that render mode as its output render
436
+ # mode.
437
+ #
438
+ # @example
439
+ # doc = Layout::Document.open("C:/path/to/document.layout")
440
+ # doc.render_mode_override = Layout::SketchUpModel::VECTOR_RENDER
441
+ #
442
+ # @param [Integer] render_mode
443
+ # +NO_OVERRIDE+, +VECTOR_RENDER+, or +HYBRID_RENDER+
444
+ #
445
+ # @raise [ArgumentError] if render_mode is not a valid render mode
446
+ #
447
+ # @raise [ArgumentError] if render_mode is +RASTER_RENDER+
448
+ #
449
+ # @version LayOut 2023.1
450
+ def render_mode_override=(render_mode)
451
+ end
452
+
453
+ # The {#save} method saves the {Layout::Document} to a file at the given path.
454
+ # Passing an empty path string will save the {Layout::Document} at its current
455
+ # path.
456
+ #
457
+ # @example
458
+ # doc = Layout::Document.open("C:/path/to/document.layout")
459
+ # # Save the model using the current Layout format
460
+ # path = File.join(ENV['Home'], 'Desktop', 'mydoc.layout')
461
+ # status = doc.save(path)
462
+ # # Save the document to the current file using the current LayOut format
463
+ # status = doc.save
464
+ # # Save the document to the current file in LayOut 3 format
465
+ # status = doc.save(Layout::Document::VERSION_3)
466
+ # # Save the document in LayOut 2013 format
467
+ # path = File.join(ENV['Home'], 'Desktop', 'mydoc_v2013.layout')
468
+ # status = doc.save(path, Layout::Document::VERSION_2013)
469
+ #
470
+ # @overload save
471
+ #
472
+ # @raise [ArgumentError] if the {Layout::Document} hasn't been saved with a
473
+ # path yet
474
+ #
475
+ # @overload save(path, version = Layout::Document::VERSION_CURRENT)
476
+ #
477
+ # @param [String] path The path to the .layout file on disk.
478
+ # @param [Integer] version LayOut file format to save.
479
+ #
480
+ # @raise [ArgumentError] if version is not a valid version
481
+ #
482
+ # @raise [ArgumentError] if saving failed. This may be due to the LayOut file
483
+ # being open in the LayOut application
484
+ #
485
+ # @version LayOut 2018
486
+ def save(*args)
487
+ end
488
+
489
+ # The {#shared_entities} method returns the {Layout::Entities}
490
+ # that exist on shared {Layout::Layer}s in the {Layout::Document}.
491
+ #
492
+ # @example
493
+ # doc = Layout::Document.open("C:/path/to/document.layout")
494
+ # entities = doc.shared_entities
495
+ #
496
+ # @return [Layout::Entities]
497
+ #
498
+ # @version LayOut 2018
499
+ def shared_entities
500
+ end
501
+
502
+ # The {#time_created} method returns the time when the {Layout::Document} was
503
+ # created.
504
+ #
505
+ # @example
506
+ # doc = Layout::Document.open("C:/path/to/document.layout")
507
+ # created_time = doc.time_created
508
+ #
509
+ # @return [Time] time when the {Layout::Document} was created
510
+ #
511
+ # @version LayOut 2018
512
+ def time_created
513
+ end
514
+
515
+ # The {#time_modified} method returns the last time the {Layout::Document} was
516
+ # modified.
517
+ #
518
+ # @example
519
+ # doc = Layout::Document.open("C:/path/to/document.layout")
520
+ # mod_time = doc.time_modified
521
+ #
522
+ # @return [Time] time when the {Layout::Document} was last modified
523
+ #
524
+ # @version LayOut 2018
525
+ def time_modified
526
+ end
527
+
528
+ # The {#time_published} method returns the time when the {Layout::Document} was
529
+ # published.
530
+ #
531
+ # @example
532
+ # doc = Layout::Document.open("C:/path/to/document.layout")
533
+ # pub_time = doc.time_published
534
+ #
535
+ # @return [Time] time when the {Layout::Document} was published
536
+ #
537
+ # @version LayOut 2018
538
+ def time_published
539
+ end
540
+
541
+ # The {#units} method returns the units for the {Layout::Document}.
542
+ #
543
+ # @example
544
+ # doc = Layout::Document.open("C:/path/to/document.layout")
545
+ # units = doc.units
546
+ #
547
+ # @return [Integer] The unit format of the {Layout::Document}
548
+ #
549
+ # @version LayOut 2018
550
+ def units
551
+ end
552
+
553
+ # The {#units=} method sets the units for the {Layout::Document}.
554
+ #
555
+ # @example
556
+ # doc = Layout::Document.open("C:/path/to/document.layout")
557
+ # units_format = LAYOUT::DOCUMENT::DECIMAL_MILLIMETERS
558
+ # doc.units = units_format
559
+ #
560
+ # @param [Integer] units_format
561
+ # The format of the units in the {Layout::Document}
562
+ #
563
+ # @raise [ArgumentError] if units format is not a valid format
564
+ #
565
+ # @version LayOut 2018
566
+ def units=(units_format)
567
+ end
568
+
569
+ end