sketchup-api-stubs 0.7.4 → 0.7.5
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.rb +1 -1
- data/lib/sketchup-api-stubs/sketchup.rb +147 -145
- data/lib/sketchup-api-stubs/stubs/Geom/BoundingBox.rb +322 -318
- data/lib/sketchup-api-stubs/stubs/Geom/Bounds2d.rb +172 -172
- data/lib/sketchup-api-stubs/stubs/Geom/LatLong.rb +126 -126
- data/lib/sketchup-api-stubs/stubs/Geom/OrientedBounds2d.rb +102 -102
- data/lib/sketchup-api-stubs/stubs/Geom/Point2d.rb +400 -400
- data/lib/sketchup-api-stubs/stubs/Geom/Point3d.rb +661 -661
- data/lib/sketchup-api-stubs/stubs/Geom/PolygonMesh.rb +498 -492
- data/lib/sketchup-api-stubs/stubs/Geom/Transformation.rb +478 -478
- data/lib/sketchup-api-stubs/stubs/Geom/Transformation2d.rb +263 -263
- data/lib/sketchup-api-stubs/stubs/Geom/UTM.rb +141 -141
- data/lib/sketchup-api-stubs/stubs/Geom/Vector2d.rb +522 -522
- data/lib/sketchup-api-stubs/stubs/Geom/Vector3d.rb +691 -691
- data/lib/sketchup-api-stubs/stubs/Layout.rb +25 -25
- data/lib/sketchup-api-stubs/stubs/Layout/AngularDimension.rb +573 -573
- data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinition.rb +411 -411
- data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinitions.rb +179 -174
- data/lib/sketchup-api-stubs/stubs/Layout/ConnectionPoint.rb +70 -70
- data/lib/sketchup-api-stubs/stubs/Layout/Document.rb +515 -514
- data/lib/sketchup-api-stubs/stubs/Layout/Ellipse.rb +29 -29
- data/lib/sketchup-api-stubs/stubs/Layout/Entities.rb +148 -143
- data/lib/sketchup-api-stubs/stubs/Layout/Entity.rb +353 -353
- data/lib/sketchup-api-stubs/stubs/Layout/FormattedText.rb +349 -349
- data/lib/sketchup-api-stubs/stubs/Layout/Grid.rb +311 -311
- data/lib/sketchup-api-stubs/stubs/Layout/Group.rb +261 -261
- data/lib/sketchup-api-stubs/stubs/Layout/Image.rb +91 -91
- data/lib/sketchup-api-stubs/stubs/Layout/Label.rb +370 -371
- data/lib/sketchup-api-stubs/stubs/Layout/Layer.rb +218 -218
- data/lib/sketchup-api-stubs/stubs/Layout/LayerInstance.rb +128 -128
- data/lib/sketchup-api-stubs/stubs/Layout/Layers.rb +225 -220
- data/lib/sketchup-api-stubs/stubs/Layout/LinearDimension.rb +567 -567
- data/lib/sketchup-api-stubs/stubs/Layout/LockedEntityError.rb +10 -10
- data/lib/sketchup-api-stubs/stubs/Layout/LockedLayerError.rb +11 -11
- data/lib/sketchup-api-stubs/stubs/Layout/Page.rb +183 -183
- data/lib/sketchup-api-stubs/stubs/Layout/PageInfo.rb +387 -387
- data/lib/sketchup-api-stubs/stubs/Layout/Pages.rb +209 -204
- data/lib/sketchup-api-stubs/stubs/Layout/Path.rb +344 -344
- data/lib/sketchup-api-stubs/stubs/Layout/Rectangle.rb +174 -174
- data/lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb +694 -694
- data/lib/sketchup-api-stubs/stubs/Layout/Style.rb +1519 -1519
- data/lib/sketchup-api-stubs/stubs/Layout/Table.rb +290 -290
- data/lib/sketchup-api-stubs/stubs/Layout/TableCell.rb +149 -149
- data/lib/sketchup-api-stubs/stubs/Layout/TableColumn.rb +139 -139
- data/lib/sketchup-api-stubs/stubs/Layout/TableRow.rb +135 -135
- data/lib/sketchup-api-stubs/stubs/Sketchup/Animation.rb +144 -140
- data/lib/sketchup-api-stubs/stubs/Sketchup/AppObserver.rb +157 -157
- data/lib/sketchup-api-stubs/stubs/Sketchup/ArcCurve.rb +209 -209
- data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionaries.rb +152 -152
- data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionary.rb +286 -281
- data/lib/sketchup-api-stubs/stubs/Sketchup/Axes.rb +149 -149
- data/lib/sketchup-api-stubs/stubs/Sketchup/Behavior.rb +302 -328
- data/lib/sketchup-api-stubs/stubs/Sketchup/Camera.rb +478 -577
- data/lib/sketchup-api-stubs/stubs/Sketchup/ClassificationSchema.rb +63 -63
- data/lib/sketchup-api-stubs/stubs/Sketchup/Classifications.rb +122 -122
- data/lib/sketchup-api-stubs/stubs/Sketchup/Color.rb +294 -281
- data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentDefinition.rb +577 -562
- data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentInstance.rb +604 -593
- data/lib/sketchup-api-stubs/stubs/Sketchup/Console.rb +76 -76
- data/lib/sketchup-api-stubs/stubs/Sketchup/ConstructionLine.rb +257 -257
- data/lib/sketchup-api-stubs/stubs/Sketchup/ConstructionPoint.rb +32 -32
- data/lib/sketchup-api-stubs/stubs/Sketchup/Curve.rb +201 -194
- data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionList.rb +362 -329
- data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionObserver.rb +74 -72
- data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionsObserver.rb +104 -102
- data/lib/sketchup-api-stubs/stubs/Sketchup/Dimension.rb +165 -165
- data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionLinear.rb +306 -312
- data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionObserver.rb +42 -38
- data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionRadial.rb +87 -87
- data/lib/sketchup-api-stubs/stubs/Sketchup/Drawingelement.rb +396 -390
- data/lib/sketchup-api-stubs/stubs/Sketchup/Edge.rb +502 -508
- data/lib/sketchup-api-stubs/stubs/Sketchup/EdgeUse.rb +211 -211
- data/lib/sketchup-api-stubs/stubs/Sketchup/Entities.rb +1126 -1119
- data/lib/sketchup-api-stubs/stubs/Sketchup/EntitiesObserver.rb +127 -125
- data/lib/sketchup-api-stubs/stubs/Sketchup/Entity.rb +545 -544
- data/lib/sketchup-api-stubs/stubs/Sketchup/EntityObserver.rb +60 -59
- data/lib/sketchup-api-stubs/stubs/Sketchup/ExtensionsManager.rb +126 -125
- data/lib/sketchup-api-stubs/stubs/Sketchup/Face.rb +751 -750
- data/lib/sketchup-api-stubs/stubs/Sketchup/FrameChangeObserver.rb +104 -104
- data/lib/sketchup-api-stubs/stubs/Sketchup/Group.rb +699 -697
- data/lib/sketchup-api-stubs/stubs/Sketchup/Http.rb +27 -27
- data/lib/sketchup-api-stubs/stubs/Sketchup/Http/Request.rb +285 -285
- data/lib/sketchup-api-stubs/stubs/Sketchup/Http/Response.rb +62 -62
- data/lib/sketchup-api-stubs/stubs/Sketchup/Image.rb +417 -409
- data/lib/sketchup-api-stubs/stubs/Sketchup/ImageRep.rb +266 -226
- data/lib/sketchup-api-stubs/stubs/Sketchup/Importer.rb +189 -190
- data/lib/sketchup-api-stubs/stubs/Sketchup/InputPoint.rb +405 -393
- data/lib/sketchup-api-stubs/stubs/Sketchup/InstanceObserver.rb +84 -82
- data/lib/sketchup-api-stubs/stubs/Sketchup/InstancePath.rb +306 -303
- data/lib/sketchup-api-stubs/stubs/Sketchup/Layer.rb +327 -285
- data/lib/sketchup-api-stubs/stubs/Sketchup/LayerFolder.rb +422 -0
- data/lib/sketchup-api-stubs/stubs/Sketchup/Layers.rb +427 -244
- data/lib/sketchup-api-stubs/stubs/Sketchup/LayersObserver.rb +249 -136
- data/lib/sketchup-api-stubs/stubs/Sketchup/Licensing.rb +48 -48
- data/lib/sketchup-api-stubs/stubs/Sketchup/Licensing/ExtensionLicense.rb +86 -86
- data/lib/sketchup-api-stubs/stubs/Sketchup/LineStyle.rb +24 -24
- data/lib/sketchup-api-stubs/stubs/Sketchup/LineStyles.rb +112 -112
- data/lib/sketchup-api-stubs/stubs/Sketchup/Loop.rb +137 -137
- data/lib/sketchup-api-stubs/stubs/Sketchup/Material.rb +414 -416
- data/lib/sketchup-api-stubs/stubs/Sketchup/Materials.rb +318 -311
- data/lib/sketchup-api-stubs/stubs/Sketchup/MaterialsObserver.rb +142 -141
- data/lib/sketchup-api-stubs/stubs/Sketchup/Menu.rb +93 -95
- data/lib/sketchup-api-stubs/stubs/Sketchup/Model.rb +1651 -1638
- data/lib/sketchup-api-stubs/stubs/Sketchup/ModelObserver.rb +357 -356
- data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsManager.rb +131 -132
- data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProvider.rb +284 -284
- data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProviderObserver.rb +58 -58
- data/lib/sketchup-api-stubs/stubs/Sketchup/Page.rb +797 -770
- data/lib/sketchup-api-stubs/stubs/Sketchup/Pages.rb +363 -353
- data/lib/sketchup-api-stubs/stubs/Sketchup/PagesObserver.rb +77 -76
- data/lib/sketchup-api-stubs/stubs/Sketchup/PickHelper.rb +478 -456
- data/lib/sketchup-api-stubs/stubs/Sketchup/RegionalSettings.rb +43 -43
- data/lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb +364 -364
- data/lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptionsObserver.rb +45 -44
- data/lib/sketchup-api-stubs/stubs/Sketchup/SectionPlane.rb +150 -150
- data/lib/sketchup-api-stubs/stubs/Sketchup/Selection.rb +459 -454
- data/lib/sketchup-api-stubs/stubs/Sketchup/SelectionObserver.rb +115 -115
- data/lib/sketchup-api-stubs/stubs/Sketchup/Set.rb +212 -212
- data/lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfo.rb +257 -257
- data/lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfoObserver.rb +59 -57
- data/lib/sketchup-api-stubs/stubs/Sketchup/Skp.rb +40 -0
- data/lib/sketchup-api-stubs/stubs/Sketchup/Style.rb +69 -69
- data/lib/sketchup-api-stubs/stubs/Sketchup/Styles.rb +217 -211
- data/lib/sketchup-api-stubs/stubs/Sketchup/Text.rb +262 -262
- data/lib/sketchup-api-stubs/stubs/Sketchup/Texture.rb +217 -225
- data/lib/sketchup-api-stubs/stubs/Sketchup/TextureWriter.rb +237 -237
- data/lib/sketchup-api-stubs/stubs/Sketchup/Tool.rb +835 -829
- data/lib/sketchup-api-stubs/stubs/Sketchup/Tools.rb +132 -132
- data/lib/sketchup-api-stubs/stubs/Sketchup/ToolsObserver.rb +156 -154
- data/lib/sketchup-api-stubs/stubs/Sketchup/UVHelper.rb +71 -61
- data/lib/sketchup-api-stubs/stubs/Sketchup/Vertex.rb +142 -142
- data/lib/sketchup-api-stubs/stubs/Sketchup/View.rb +1307 -1301
- data/lib/sketchup-api-stubs/stubs/Sketchup/ViewObserver.rb +45 -43
- data/lib/sketchup-api-stubs/stubs/UI/Command.rb +317 -310
- data/lib/sketchup-api-stubs/stubs/UI/HtmlDialog.rb +387 -356
- data/lib/sketchup-api-stubs/stubs/UI/Notification.rb +255 -229
- data/lib/sketchup-api-stubs/stubs/UI/Toolbar.rb +240 -240
- data/lib/sketchup-api-stubs/stubs/UI/WebDialog.rb +633 -633
- data/lib/sketchup-api-stubs/stubs/_top_level.rb +311 -311
- data/lib/sketchup-api-stubs/stubs/array.rb +741 -741
- data/lib/sketchup-api-stubs/stubs/geom.rb +351 -348
- data/lib/sketchup-api-stubs/stubs/languagehandler.rb +92 -92
- data/lib/sketchup-api-stubs/stubs/length.rb +278 -278
- data/lib/sketchup-api-stubs/stubs/numeric.rb +249 -249
- data/lib/sketchup-api-stubs/stubs/sketchup.rb +1342 -1310
- data/lib/sketchup-api-stubs/stubs/sketchupextension.rb +353 -353
- data/lib/sketchup-api-stubs/stubs/string.rb +24 -24
- data/lib/sketchup-api-stubs/stubs/ui.rb +668 -667
- metadata +4 -2
@@ -1,514 +1,515 @@
|
|
1
|
-
# Copyright:: Copyright 2020 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
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
# .
|
56
|
-
#
|
57
|
-
#
|
58
|
-
#
|
59
|
-
#
|
60
|
-
#
|
61
|
-
#
|
62
|
-
#
|
63
|
-
#
|
64
|
-
#
|
65
|
-
#
|
66
|
-
#
|
67
|
-
#
|
68
|
-
#
|
69
|
-
#
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
#
|
77
|
-
#
|
78
|
-
#
|
79
|
-
#
|
80
|
-
#
|
81
|
-
#
|
82
|
-
#
|
83
|
-
#
|
84
|
-
#
|
85
|
-
#
|
86
|
-
#
|
87
|
-
#
|
88
|
-
#
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
#
|
94
|
-
#
|
95
|
-
#
|
96
|
-
# {Layout::
|
97
|
-
#
|
98
|
-
#
|
99
|
-
#
|
100
|
-
#
|
101
|
-
#
|
102
|
-
#
|
103
|
-
#
|
104
|
-
#
|
105
|
-
#
|
106
|
-
#
|
107
|
-
#
|
108
|
-
#
|
109
|
-
# @param [Layout::
|
110
|
-
#
|
111
|
-
#
|
112
|
-
#
|
113
|
-
#
|
114
|
-
#
|
115
|
-
#
|
116
|
-
#
|
117
|
-
# @param [Layout::
|
118
|
-
#
|
119
|
-
#
|
120
|
-
#
|
121
|
-
#
|
122
|
-
#
|
123
|
-
#
|
124
|
-
#
|
125
|
-
#
|
126
|
-
#
|
127
|
-
#
|
128
|
-
#
|
129
|
-
#
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
# {
|
135
|
-
#
|
136
|
-
#
|
137
|
-
#
|
138
|
-
#
|
139
|
-
#
|
140
|
-
#
|
141
|
-
#
|
142
|
-
#
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
#
|
148
|
-
#
|
149
|
-
#
|
150
|
-
#
|
151
|
-
#
|
152
|
-
#
|
153
|
-
#
|
154
|
-
#
|
155
|
-
#
|
156
|
-
#
|
157
|
-
#
|
158
|
-
#
|
159
|
-
#
|
160
|
-
# #
|
161
|
-
# #
|
162
|
-
#
|
163
|
-
#
|
164
|
-
#
|
165
|
-
#
|
166
|
-
#
|
167
|
-
#
|
168
|
-
#
|
169
|
-
#
|
170
|
-
#
|
171
|
-
#
|
172
|
-
#
|
173
|
-
#
|
174
|
-
#
|
175
|
-
#
|
176
|
-
#
|
177
|
-
#
|
178
|
-
#
|
179
|
-
#
|
180
|
-
#
|
181
|
-
#
|
182
|
-
#
|
183
|
-
#
|
184
|
-
#
|
185
|
-
#
|
186
|
-
#
|
187
|
-
#
|
188
|
-
#
|
189
|
-
#
|
190
|
-
#
|
191
|
-
#
|
192
|
-
#
|
193
|
-
#
|
194
|
-
#
|
195
|
-
#
|
196
|
-
#
|
197
|
-
#
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
#
|
203
|
-
#
|
204
|
-
#
|
205
|
-
#
|
206
|
-
#
|
207
|
-
#
|
208
|
-
#
|
209
|
-
#
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
#
|
215
|
-
#
|
216
|
-
#
|
217
|
-
#
|
218
|
-
# doc
|
219
|
-
#
|
220
|
-
#
|
221
|
-
#
|
222
|
-
#
|
223
|
-
#
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
#
|
229
|
-
#
|
230
|
-
#
|
231
|
-
#
|
232
|
-
#
|
233
|
-
#
|
234
|
-
#
|
235
|
-
#
|
236
|
-
#
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
#
|
242
|
-
# {Layout::Document}
|
243
|
-
#
|
244
|
-
#
|
245
|
-
#
|
246
|
-
#
|
247
|
-
#
|
248
|
-
#
|
249
|
-
#
|
250
|
-
#
|
251
|
-
#
|
252
|
-
#
|
253
|
-
#
|
254
|
-
#
|
255
|
-
#
|
256
|
-
#
|
257
|
-
#
|
258
|
-
#
|
259
|
-
#
|
260
|
-
#
|
261
|
-
#
|
262
|
-
#
|
263
|
-
#
|
264
|
-
#
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
#
|
270
|
-
#
|
271
|
-
#
|
272
|
-
#
|
273
|
-
#
|
274
|
-
#
|
275
|
-
#
|
276
|
-
#
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
# {
|
282
|
-
#
|
283
|
-
#
|
284
|
-
#
|
285
|
-
# doc
|
286
|
-
#
|
287
|
-
#
|
288
|
-
#
|
289
|
-
#
|
290
|
-
#
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
#
|
296
|
-
#
|
297
|
-
#
|
298
|
-
#
|
299
|
-
#
|
300
|
-
#
|
301
|
-
#
|
302
|
-
#
|
303
|
-
#
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
#
|
309
|
-
#
|
310
|
-
#
|
311
|
-
#
|
312
|
-
#
|
313
|
-
#
|
314
|
-
#
|
315
|
-
#
|
316
|
-
#
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
#
|
322
|
-
#
|
323
|
-
#
|
324
|
-
#
|
325
|
-
#
|
326
|
-
#
|
327
|
-
#
|
328
|
-
#
|
329
|
-
#
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
#
|
335
|
-
#
|
336
|
-
#
|
337
|
-
#
|
338
|
-
#
|
339
|
-
#
|
340
|
-
#
|
341
|
-
#
|
342
|
-
#
|
343
|
-
#
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
#
|
349
|
-
#
|
350
|
-
#
|
351
|
-
#
|
352
|
-
#
|
353
|
-
#
|
354
|
-
#
|
355
|
-
#
|
356
|
-
#
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
#
|
362
|
-
#
|
363
|
-
#
|
364
|
-
# doc
|
365
|
-
#
|
366
|
-
#
|
367
|
-
#
|
368
|
-
#
|
369
|
-
#
|
370
|
-
#
|
371
|
-
#
|
372
|
-
#
|
373
|
-
#
|
374
|
-
#
|
375
|
-
#
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
# {
|
381
|
-
#
|
382
|
-
#
|
383
|
-
#
|
384
|
-
#
|
385
|
-
#
|
386
|
-
#
|
387
|
-
#
|
388
|
-
#
|
389
|
-
#
|
390
|
-
#
|
391
|
-
#
|
392
|
-
#
|
393
|
-
#
|
394
|
-
#
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
#
|
400
|
-
# path
|
401
|
-
#
|
402
|
-
#
|
403
|
-
#
|
404
|
-
#
|
405
|
-
#
|
406
|
-
#
|
407
|
-
#
|
408
|
-
#
|
409
|
-
#
|
410
|
-
#
|
411
|
-
#
|
412
|
-
#
|
413
|
-
#
|
414
|
-
#
|
415
|
-
#
|
416
|
-
#
|
417
|
-
#
|
418
|
-
#
|
419
|
-
#
|
420
|
-
#
|
421
|
-
#
|
422
|
-
#
|
423
|
-
# @param [
|
424
|
-
#
|
425
|
-
#
|
426
|
-
#
|
427
|
-
#
|
428
|
-
#
|
429
|
-
#
|
430
|
-
#
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
#
|
436
|
-
#
|
437
|
-
#
|
438
|
-
#
|
439
|
-
#
|
440
|
-
#
|
441
|
-
#
|
442
|
-
#
|
443
|
-
#
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
#
|
449
|
-
#
|
450
|
-
#
|
451
|
-
#
|
452
|
-
#
|
453
|
-
#
|
454
|
-
#
|
455
|
-
#
|
456
|
-
#
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
#
|
462
|
-
#
|
463
|
-
#
|
464
|
-
#
|
465
|
-
#
|
466
|
-
#
|
467
|
-
#
|
468
|
-
#
|
469
|
-
#
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
#
|
475
|
-
#
|
476
|
-
#
|
477
|
-
#
|
478
|
-
#
|
479
|
-
#
|
480
|
-
#
|
481
|
-
#
|
482
|
-
#
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
#
|
488
|
-
#
|
489
|
-
#
|
490
|
-
#
|
491
|
-
#
|
492
|
-
#
|
493
|
-
#
|
494
|
-
#
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
#
|
500
|
-
#
|
501
|
-
#
|
502
|
-
#
|
503
|
-
#
|
504
|
-
#
|
505
|
-
#
|
506
|
-
#
|
507
|
-
#
|
508
|
-
#
|
509
|
-
#
|
510
|
-
#
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
1
|
+
# Copyright:: Copyright 2020 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_3 = nil # Stub value.
|
51
|
+
VERSION_CURRENT = nil # Stub value.
|
52
|
+
|
53
|
+
# Class Methods
|
54
|
+
|
55
|
+
# The {.open} method creates a new {Layout::Document} by loading an existing
|
56
|
+
# .layout file.
|
57
|
+
#
|
58
|
+
# @example
|
59
|
+
# filename = File.join(ENV['Home'], 'Desktop', 'template.layout')
|
60
|
+
# doc = Layout::Document.open(filename)
|
61
|
+
#
|
62
|
+
# @param [String] path
|
63
|
+
# The path to the .layout file on disk.
|
64
|
+
#
|
65
|
+
# @raise [ArgumentError] if the file does not exist
|
66
|
+
#
|
67
|
+
# @return [Layout::Document] The {Layout::Document} created from the .layout
|
68
|
+
# file.
|
69
|
+
#
|
70
|
+
# @version LayOut 2018
|
71
|
+
def self.open(path)
|
72
|
+
end
|
73
|
+
|
74
|
+
# Instance Methods
|
75
|
+
|
76
|
+
# The {#==} method checks to see if the two {Layout::Document}s are equal.
|
77
|
+
# This checks whether the Ruby Objects are pointing to the same internal
|
78
|
+
# object.
|
79
|
+
#
|
80
|
+
# @example
|
81
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
82
|
+
# document = doc.pages.first.document
|
83
|
+
# doc == document
|
84
|
+
#
|
85
|
+
# @param [Layout::Document] other
|
86
|
+
#
|
87
|
+
# @return [Boolean]
|
88
|
+
#
|
89
|
+
# @version LayOut 2018
|
90
|
+
def ==(other)
|
91
|
+
end
|
92
|
+
|
93
|
+
# The {#add_entity} method adds an {Layout::Entity} to the {Layout::Document}
|
94
|
+
# and places it on the given {Layout::Layer} and {Layout::Page}. If layer is a
|
95
|
+
# shared {Layout::Layer} then page may be ommitted. The {Layout::Entity} must
|
96
|
+
# not already belong to a {Layout::Document}. If the {Layout::Entity} is a
|
97
|
+
# {Layout::Group}, then the {Layout::Group} along with all of its children will
|
98
|
+
# be added to the {Layout::Document}.
|
99
|
+
#
|
100
|
+
# @example
|
101
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
102
|
+
# rect = Layout::Rectangle.new([[1, 1], [2, 2]])
|
103
|
+
# all_layers = doc.layers
|
104
|
+
# all_pages = doc.pages
|
105
|
+
# doc.add_entity(rect, all_layers.first, all_pages.first)
|
106
|
+
#
|
107
|
+
# @overload add_entity(entity, layer, page)
|
108
|
+
#
|
109
|
+
# @param [Layout::Entity] entity The {Layout::Entity} to be added
|
110
|
+
# @param [Layout::Layer] layer The {Layout::Layer} to add the
|
111
|
+
# {Layout::Entity} to
|
112
|
+
# @param [Layout::Page] page The {Layout::Page} to add the {Layout::Entity}
|
113
|
+
# to
|
114
|
+
#
|
115
|
+
# @overload add_entity(entity, layer)
|
116
|
+
#
|
117
|
+
# @param [Layout::Entity] entity The {Layout::Entity} to be added
|
118
|
+
# @param [Layout::Layer] layer The shared {Layout::Layer} to add the
|
119
|
+
# {Layout::Entity} to
|
120
|
+
#
|
121
|
+
# @raise [ArgumentError] if no {Layout::Page} is passed in and layer is
|
122
|
+
# non-shared
|
123
|
+
#
|
124
|
+
# @raise [ArgumentError] if page does not belong to the {Layout::Document}
|
125
|
+
#
|
126
|
+
# @raise [ArgumentError] if layer does not belong to the {Layout::Document}
|
127
|
+
#
|
128
|
+
# @raise [ArgumentError] if entity already belongs to a {Layout::Document}
|
129
|
+
#
|
130
|
+
# @version LayOut 2018
|
131
|
+
def add_entity(*args)
|
132
|
+
end
|
133
|
+
|
134
|
+
# The {#auto_text_definitions} method returns an array of
|
135
|
+
# {Layout::AutoTextDefinition}'s in the {Layout::Document}.
|
136
|
+
#
|
137
|
+
# @example
|
138
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
139
|
+
# defs = doc.auto_text_definitions
|
140
|
+
#
|
141
|
+
# @return [Layout::AutoTextDefinitions]
|
142
|
+
#
|
143
|
+
# @version LayOut 2018
|
144
|
+
def auto_text_definitions
|
145
|
+
end
|
146
|
+
|
147
|
+
# The {#export} method exports the {Layout::Document} to a given file format.
|
148
|
+
# It knows which format to export based on the file extension you place on the
|
149
|
+
# file name. For example, a filename of "thing.pdf" will export a PDF file,
|
150
|
+
# whereas "thing.png" will export a set of PNG images.
|
151
|
+
#
|
152
|
+
# For LayOut version 2020.1, valid extensions include .pdf, .jpg, and .png.
|
153
|
+
#
|
154
|
+
# @example PDF Export Examples
|
155
|
+
# doc = Layout::Document.open("c:/path/to/document.layout")
|
156
|
+
#
|
157
|
+
# # Export pdf file on a PC, with default settings.
|
158
|
+
# status = doc.export("c:/my_export.pdf")
|
159
|
+
#
|
160
|
+
# # Export pages one through three at high quality, compressing jpeg images
|
161
|
+
# # at 0.75 compression quality (valid range is 0.0 - 1.0). Note that the
|
162
|
+
# # first page of a {Layout::Document} is index 0.
|
163
|
+
# options = { start_page: 1,
|
164
|
+
# end_page: 3,
|
165
|
+
# output_resolution: Layout::PageInfo::RESOLUTION_HIGH,
|
166
|
+
# compress_images: TRUE,
|
167
|
+
# compress_quality: 0.75 }
|
168
|
+
#
|
169
|
+
# status = doc.export("c:/my_export.pdf", options)
|
170
|
+
#
|
171
|
+
# @example Image Set Export Examples
|
172
|
+
# doc = Layout::Document.open("c:/path/to/document.layout")
|
173
|
+
#
|
174
|
+
# # Export png files on macOS, with default settings.
|
175
|
+
# status = doc.export('/Users/username/Desktop/pngs/page.png')
|
176
|
+
#
|
177
|
+
# # Export pages one through three at 300 dpi as JPGs.
|
178
|
+
# options = { start_page: 1,
|
179
|
+
# end_page: 3,
|
180
|
+
# dpi: 300 }
|
181
|
+
# status = doc.export('c:/page.jpg', options)
|
182
|
+
#
|
183
|
+
# @param [String] file_path
|
184
|
+
# The file or image set to create. The directory
|
185
|
+
# path must already exist. The path must include the file extension.
|
186
|
+
#
|
187
|
+
# @param [Hash, nil] options
|
188
|
+
# An optional hash of settings for the export.
|
189
|
+
#
|
190
|
+
# @raise [TypeError] if an options value is the wrong type
|
191
|
+
#
|
192
|
+
# @raise [RangeError] if an options value is out of range
|
193
|
+
#
|
194
|
+
# @raise [ArgumentError] if the full file path does not exist
|
195
|
+
#
|
196
|
+
# @raise [ArgumentError] if the specified file type is missing or not supported
|
197
|
+
#
|
198
|
+
# @version LayOut 2020.1
|
199
|
+
def export(file_path, options = nil)
|
200
|
+
end
|
201
|
+
|
202
|
+
# The {#grid} method returns the {Layout::Grid} for a {Layout::Document}.
|
203
|
+
#
|
204
|
+
# @example
|
205
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
206
|
+
# grid = doc.grid
|
207
|
+
#
|
208
|
+
# @return [Layout::Grid]
|
209
|
+
#
|
210
|
+
# @version LayOut 2018
|
211
|
+
def grid
|
212
|
+
end
|
213
|
+
|
214
|
+
# The {#grid_snap_enabled=} method sets whether or not grid snap is enabled in
|
215
|
+
# the {Layout::Document}.
|
216
|
+
#
|
217
|
+
# @example
|
218
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
219
|
+
# doc.grid_snap_enabled = true
|
220
|
+
#
|
221
|
+
# @param [Boolean] enabled
|
222
|
+
# +true+ for enabled +false+ for disabled
|
223
|
+
#
|
224
|
+
# @version LayOut 2018
|
225
|
+
def grid_snap_enabled=(enabled)
|
226
|
+
end
|
227
|
+
|
228
|
+
# The {#grid_snap_enabled?} method returns whether or not grid snap is enabled
|
229
|
+
# in the {Layout::Document}.
|
230
|
+
#
|
231
|
+
# @example
|
232
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
233
|
+
# enabled = doc.grid_snap_enabled?
|
234
|
+
#
|
235
|
+
# @return [Boolean]
|
236
|
+
#
|
237
|
+
# @version LayOut 2018
|
238
|
+
def grid_snap_enabled?
|
239
|
+
end
|
240
|
+
|
241
|
+
# The {#initialize} method creates a new {Layout::Document}. Passing a path to
|
242
|
+
# an existing {Layout::Document} will use that file as a template. The new
|
243
|
+
# {Layout::Document} won't have a path until it is saved for the first time.
|
244
|
+
#
|
245
|
+
# @example
|
246
|
+
# doc = Layout::Document.new
|
247
|
+
# doc2 = Layout::Document.new("/path/to/template.layout")
|
248
|
+
#
|
249
|
+
# @overload initialize
|
250
|
+
#
|
251
|
+
# @return [Layout::Document] an empty {Layout::Document} with one
|
252
|
+
# {Layout::Layer} and one {Layout::Page}
|
253
|
+
#
|
254
|
+
# @overload initialize(template_path)
|
255
|
+
#
|
256
|
+
# @param [String] template_path The path to the {Layout::Document} to use as
|
257
|
+
# a template
|
258
|
+
# @return [Layout::Document] an unsaved {Layout::Document} based on the
|
259
|
+
# template
|
260
|
+
#
|
261
|
+
# @raise [RuntimeError] if there was an error reading the template file
|
262
|
+
#
|
263
|
+
# @raise [ArgumentError] if the template file could not be found
|
264
|
+
#
|
265
|
+
# @version LayOut 2018
|
266
|
+
def initialize(*args)
|
267
|
+
end
|
268
|
+
|
269
|
+
# The {#layers} method returns the {Layout::Layers} of the {Layout::Document}.
|
270
|
+
#
|
271
|
+
# @example
|
272
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
273
|
+
# layers = doc.layers
|
274
|
+
#
|
275
|
+
# @return [Layout::Layers]
|
276
|
+
#
|
277
|
+
# @version LayOut 2018
|
278
|
+
def layers
|
279
|
+
end
|
280
|
+
|
281
|
+
# The {#object_snap_enabled=} method enables or disables inference in the
|
282
|
+
# {Layout::Document}.
|
283
|
+
#
|
284
|
+
# @example
|
285
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
286
|
+
# doc.object_snap_enabled = false
|
287
|
+
#
|
288
|
+
# @param [Boolean] enabled
|
289
|
+
# +true+ for enabled +false+ for disabled
|
290
|
+
#
|
291
|
+
# @version LayOut 2018
|
292
|
+
def object_snap_enabled=(enabled)
|
293
|
+
end
|
294
|
+
|
295
|
+
# The {#object_snap_enabled?} method returns whether or not inference is
|
296
|
+
# enabled in the {Layout::Document}.
|
297
|
+
#
|
298
|
+
# @example
|
299
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
300
|
+
# enabled = doc.object_snap_enabled?
|
301
|
+
#
|
302
|
+
# @return [Boolean]
|
303
|
+
#
|
304
|
+
# @version LayOut 2018
|
305
|
+
def object_snap_enabled?
|
306
|
+
end
|
307
|
+
|
308
|
+
# The {#page_info} method returns a reference to the {Layout::PageInfo}
|
309
|
+
# settings of the {Layout::Document}.
|
310
|
+
#
|
311
|
+
# @example
|
312
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
313
|
+
# page_info = doc.page_info
|
314
|
+
#
|
315
|
+
# @return [Layout::PageInfo]
|
316
|
+
#
|
317
|
+
# @version LayOut 2018
|
318
|
+
def page_info
|
319
|
+
end
|
320
|
+
|
321
|
+
# The {#pages} method returns the {Layout::Pages} of the {Layout::Document}.
|
322
|
+
#
|
323
|
+
#
|
324
|
+
# @example:
|
325
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
326
|
+
# doc_pages = doc.pages
|
327
|
+
#
|
328
|
+
# @return [Layout::Pages] The {Layout::Pages} for the {Layout::Document}.
|
329
|
+
#
|
330
|
+
# @version LayOut 2018
|
331
|
+
def pages
|
332
|
+
end
|
333
|
+
|
334
|
+
# The {#path} method returns the full path of the {Layout::Document} file. An
|
335
|
+
# empty string is returned for a new {Layout::Document} (one which has not
|
336
|
+
# been saved and opened).
|
337
|
+
#
|
338
|
+
# @example
|
339
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
340
|
+
# path = doc.path
|
341
|
+
#
|
342
|
+
# @return [String]
|
343
|
+
#
|
344
|
+
# @version LayOut 2018
|
345
|
+
def path
|
346
|
+
end
|
347
|
+
|
348
|
+
# The {#precision} method returns the precision for the {Layout::Document}.
|
349
|
+
#
|
350
|
+
# @example
|
351
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
352
|
+
# precision = doc.precision
|
353
|
+
#
|
354
|
+
# @return [Float] the number specifying the precision for the
|
355
|
+
# {Layout::Document}
|
356
|
+
#
|
357
|
+
# @version LayOut 2018
|
358
|
+
def precision
|
359
|
+
end
|
360
|
+
|
361
|
+
# The {#precision=} method sets the precision for the {Layout::Document}.
|
362
|
+
#
|
363
|
+
# @example
|
364
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
365
|
+
# doc.precision = 0.0001
|
366
|
+
#
|
367
|
+
# @note LayOut only allows for a finite set of precision values for each units
|
368
|
+
# setting, so it will set the precision to the closest valid setting for the
|
369
|
+
# specified units. See the "Units" section of LayOut's "Document Setup"
|
370
|
+
# dialog for a reference of the available precisions for each units setting.
|
371
|
+
#
|
372
|
+
# @param [Float] precision
|
373
|
+
# The double specifying the precision for the
|
374
|
+
# {Layout::Document}
|
375
|
+
#
|
376
|
+
# @version LayOut 2018
|
377
|
+
def precision=(precision)
|
378
|
+
end
|
379
|
+
|
380
|
+
# The {#remove_entity} method removes an {Layout::Entity} from the
|
381
|
+
# {Layout::Document}. If entity is a {Layout::Group}, then the {Layout::Group}
|
382
|
+
# and all of its children will be removed from the {Layout::Document}.
|
383
|
+
#
|
384
|
+
# @example
|
385
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
386
|
+
# shared_entities = doc.shared_entities
|
387
|
+
# # Remove the first entity in the document
|
388
|
+
# doc.remove_entity(shared_entities.first)
|
389
|
+
#
|
390
|
+
# @param [Layout::Entity] entity
|
391
|
+
# The {Layout::Entity} to be removed
|
392
|
+
#
|
393
|
+
# @raise [ArgumentError] if entity does not belong to the {Layout::Document}
|
394
|
+
#
|
395
|
+
# @version LayOut 2018
|
396
|
+
def remove_entity(entity)
|
397
|
+
end
|
398
|
+
|
399
|
+
# The {#save} method saves the {Layout::Document} to a file at the given path.
|
400
|
+
# Passing an empty path string will save the {Layout::Document} at its current
|
401
|
+
# path.
|
402
|
+
#
|
403
|
+
# @example
|
404
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
405
|
+
# # Save the model using the current Layout format
|
406
|
+
# path = File.join(ENV['Home'], 'Desktop', 'mydoc.layout')
|
407
|
+
# status = doc.save(path)
|
408
|
+
# # Save the document to the current file using the current LayOut format
|
409
|
+
# status = doc.save
|
410
|
+
# # Save the document to the current file in LayOut 3 format
|
411
|
+
# status = doc.save(Layout::Document::VERSION_3)
|
412
|
+
# # Save the document in LayOut 2013 format
|
413
|
+
# path = File.join(ENV['Home'], 'Desktop', 'mydoc_v2013.layout')
|
414
|
+
# status = doc.save(path, Layout::Document::VERSION_2013)
|
415
|
+
#
|
416
|
+
# @overload save
|
417
|
+
#
|
418
|
+
# @raise [ArgumentError] if the {Layout::Document} hasn't been saved with a
|
419
|
+
# path yet
|
420
|
+
#
|
421
|
+
# @overload save(path, version = Layout::Document::VERSION_CURRENT)
|
422
|
+
#
|
423
|
+
# @param [String] path The path to the .layout file on disk.
|
424
|
+
# @param [Integer] version LayOut file format to save.
|
425
|
+
#
|
426
|
+
# @raise [ArgumentError] if version is not a valid version
|
427
|
+
#
|
428
|
+
# @raise [ArgumentError] if saving failed. This may be due to the LayOut file
|
429
|
+
# being open in the LayOut application
|
430
|
+
#
|
431
|
+
# @version LayOut 2018
|
432
|
+
def save(*args)
|
433
|
+
end
|
434
|
+
|
435
|
+
# The {#shared_entities} method returns the {Layout::Entities}
|
436
|
+
# that exist on shared {Layout::Layer}s in the {Layout::Document}.
|
437
|
+
#
|
438
|
+
# @example
|
439
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
440
|
+
# entities = doc.shared_entities
|
441
|
+
#
|
442
|
+
# @return [Layout::Entities]
|
443
|
+
#
|
444
|
+
# @version LayOut 2018
|
445
|
+
def shared_entities
|
446
|
+
end
|
447
|
+
|
448
|
+
# The {#time_created} method returns the time when the {Layout::Document} was
|
449
|
+
# created.
|
450
|
+
#
|
451
|
+
# @example
|
452
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
453
|
+
# created_time = doc.time_created
|
454
|
+
#
|
455
|
+
# @return [Time] time when the {Layout::Document} was created
|
456
|
+
#
|
457
|
+
# @version LayOut 2018
|
458
|
+
def time_created
|
459
|
+
end
|
460
|
+
|
461
|
+
# The {#time_modified} method returns the last time the {Layout::Document} was
|
462
|
+
# modified.
|
463
|
+
#
|
464
|
+
# @example
|
465
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
466
|
+
# mod_time = doc.time_modified
|
467
|
+
#
|
468
|
+
# @return [Time] time when the {Layout::Document} was last modified
|
469
|
+
#
|
470
|
+
# @version LayOut 2018
|
471
|
+
def time_modified
|
472
|
+
end
|
473
|
+
|
474
|
+
# The {#time_published} method returns the time when the {Layout::Document} was
|
475
|
+
# published.
|
476
|
+
#
|
477
|
+
# @example
|
478
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
479
|
+
# pub_time = doc.time_published
|
480
|
+
#
|
481
|
+
# @return [Time] time when the {Layout::Document} was published
|
482
|
+
#
|
483
|
+
# @version LayOut 2018
|
484
|
+
def time_published
|
485
|
+
end
|
486
|
+
|
487
|
+
# The {#units} method returns the units for the {Layout::Document}.
|
488
|
+
#
|
489
|
+
# @example
|
490
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
491
|
+
# units = doc.units
|
492
|
+
#
|
493
|
+
# @return [Integer] The unit format of the {Layout::Document}
|
494
|
+
#
|
495
|
+
# @version LayOut 2018
|
496
|
+
def units
|
497
|
+
end
|
498
|
+
|
499
|
+
# The {#units=} method sets the units for the {Layout::Document}.
|
500
|
+
#
|
501
|
+
# @example
|
502
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
503
|
+
# units_format = LAYOUT::DOCUMENT::DECIMAL_MILLIMETERS
|
504
|
+
# doc.units = units_format
|
505
|
+
#
|
506
|
+
# @param [Integer] units_format
|
507
|
+
# The format of the units in the {Layout::Document}
|
508
|
+
#
|
509
|
+
# @raise [ArgumentError] if units format is not a valid format
|
510
|
+
#
|
511
|
+
# @version LayOut 2018
|
512
|
+
def units=(units_format)
|
513
|
+
end
|
514
|
+
|
515
|
+
end
|