scriptup 2024.0.4 → 2024.0.6

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 (57) hide show
  1. checksums.yaml +4 -4
  2. data/ext/attribute_dictionaries.c +1 -1
  3. data/ext/color.c +3 -3
  4. data/ext/component_definition.c +2 -2
  5. data/ext/definition_list.c +1 -1
  6. data/ext/entity.c +4 -3
  7. data/ext/material.c +4 -7
  8. data/ext/utils.h +4 -4
  9. data/sketchup-sdk-win/binaries/layout/x64/LayOutAPI.dll +0 -0
  10. data/sketchup-sdk-win/binaries/layout/x64/LayOutAPI.lib +0 -0
  11. data/sketchup-sdk-win/binaries/layout/x64/LayOutControllers.dll +0 -0
  12. data/sketchup-sdk-win/binaries/layout/x64/LayOutModel.dll +0 -0
  13. data/sketchup-sdk-win/binaries/layout/x64/LayOutRTF.dll +0 -0
  14. data/sketchup-sdk-win/binaries/layout/x64/LayOutUtils.dll +0 -0
  15. data/sketchup-sdk-win/binaries/layout/x64/SketchUpCommonPreferences.dll +0 -0
  16. data/sketchup-sdk-win/binaries/layout/x64/SketchUpViewerAPI.dll +0 -0
  17. data/sketchup-sdk-win/binaries/layout/x64/SketchUpViewerAPI.lib +0 -0
  18. data/sketchup-sdk-win/binaries/layout/x64/pdflib.dll +0 -0
  19. data/sketchup-sdk-win/headers/LayOutAPI/application/application.h +117 -0
  20. data/sketchup-sdk-win/headers/LayOutAPI/common.h +22 -0
  21. data/sketchup-sdk-win/headers/LayOutAPI/geometry/geometry.h +78 -0
  22. data/sketchup-sdk-win/headers/LayOutAPI/initialize.h +36 -0
  23. data/sketchup-sdk-win/headers/LayOutAPI/layout.h +49 -0
  24. data/sketchup-sdk-win/headers/LayOutAPI/model/angulardimension.h +468 -0
  25. data/sketchup-sdk-win/headers/LayOutAPI/model/autotextdefinition.h +569 -0
  26. data/sketchup-sdk-win/headers/LayOutAPI/model/autotextdefinitionlist.h +79 -0
  27. data/sketchup-sdk-win/headers/LayOutAPI/model/connectionpoint.h +107 -0
  28. data/sketchup-sdk-win/headers/LayOutAPI/model/defs.h +42 -0
  29. data/sketchup-sdk-win/headers/LayOutAPI/model/dictionary.h +120 -0
  30. data/sketchup-sdk-win/headers/LayOutAPI/model/document.h +864 -0
  31. data/sketchup-sdk-win/headers/LayOutAPI/model/documentexportoptions.h +59 -0
  32. data/sketchup-sdk-win/headers/LayOutAPI/model/ellipse.h +78 -0
  33. data/sketchup-sdk-win/headers/LayOutAPI/model/entity.h +330 -0
  34. data/sketchup-sdk-win/headers/LayOutAPI/model/entityiterator.h +49 -0
  35. data/sketchup-sdk-win/headers/LayOutAPI/model/entitylist.h +114 -0
  36. data/sketchup-sdk-win/headers/LayOutAPI/model/formattedtext.h +397 -0
  37. data/sketchup-sdk-win/headers/LayOutAPI/model/grid.h +251 -0
  38. data/sketchup-sdk-win/headers/LayOutAPI/model/group.h +243 -0
  39. data/sketchup-sdk-win/headers/LayOutAPI/model/image.h +146 -0
  40. data/sketchup-sdk-win/headers/LayOutAPI/model/imagerep.h +109 -0
  41. data/sketchup-sdk-win/headers/LayOutAPI/model/label.h +332 -0
  42. data/sketchup-sdk-win/headers/LayOutAPI/model/layer.h +207 -0
  43. data/sketchup-sdk-win/headers/LayOutAPI/model/layerinstance.h +117 -0
  44. data/sketchup-sdk-win/headers/LayOutAPI/model/layerlist.h +69 -0
  45. data/sketchup-sdk-win/headers/LayOutAPI/model/lineardimension.h +456 -0
  46. data/sketchup-sdk-win/headers/LayOutAPI/model/page.h +261 -0
  47. data/sketchup-sdk-win/headers/LayOutAPI/model/pageinfo.h +372 -0
  48. data/sketchup-sdk-win/headers/LayOutAPI/model/pagelist.h +81 -0
  49. data/sketchup-sdk-win/headers/LayOutAPI/model/path.h +464 -0
  50. data/sketchup-sdk-win/headers/LayOutAPI/model/rectangle.h +240 -0
  51. data/sketchup-sdk-win/headers/LayOutAPI/model/referenceentity.h +120 -0
  52. data/sketchup-sdk-win/headers/LayOutAPI/model/sketchupmodel.h +624 -0
  53. data/sketchup-sdk-win/headers/LayOutAPI/model/skpfilereference.h +94 -0
  54. data/sketchup-sdk-win/headers/LayOutAPI/model/style.h +1080 -0
  55. data/sketchup-sdk-win/headers/LayOutAPI/model/table.h +470 -0
  56. data/sketchup-sdk-win/headers/LayOutAPI/model/typed_value.h +156 -0
  57. metadata +50 -2
@@ -0,0 +1,864 @@
1
+ // Copyright 2015-2023 Trimble Inc. All rights reserved.
2
+ // This file is intended for public distribution.
3
+
4
+ #ifndef LAYOUT_MODEL_DOCUMENT_H_
5
+ #define LAYOUT_MODEL_DOCUMENT_H_
6
+
7
+ #include <LayOutAPI/common.h>
8
+ #include <LayOutAPI/model/defs.h>
9
+ #include <LayOutAPI/model/imagerep.h>
10
+ #include <LayOutAPI/model/sketchupmodel.h>
11
+ #include <time.h>
12
+
13
+ /**
14
+ @struct LODocumentRef
15
+ @brief References a LayOut document.
16
+ */
17
+
18
+ /**
19
+ @enum LODocumentVersion
20
+ @brief Defines the different versions of the .layout file format that are
21
+ supported.
22
+ */
23
+ typedef enum {
24
+ LODocumentVersion_1 = 1, ///< LayOut 1.0
25
+ LODocumentVersion_2 = 2, ///< LayOut 2.0
26
+ LODocumentVersion_3 = 3, ///< LayOut 3.0
27
+ LODocumentVersion_2013 = 13, ///< LayOut 2013
28
+ LODocumentVersion_2014 = 14, ///< LayOut 2014
29
+ LODocumentVersion_2015 = 15, ///< LayOut 2015
30
+ LODocumentVersion_2016 = 16, ///< LayOut 2016
31
+ LODocumentVersion_2017 = 17, ///< LayOut 2017
32
+ LODocumentVersion_2018 = 18, ///< LayOut 2018
33
+ LODocumentVersion_2019 = 19, ///< LayOut 2019
34
+ LODocumentVersion_2020 = 20, ///< LayOut 2020
35
+ LODocumentVersion_2021 = 21, ///< LayOut 2021
36
+ LODocumentVersion_2022 = 22, ///< LayOut 2022
37
+ LODocumentVersion_2023 = 23, ///< LayOut 2023
38
+
39
+ LODocumentVersion_Current = LODocumentVersion_2023, ///< The most current version supported.
40
+
41
+ LONumDocumentVersions
42
+ } LODocumentVersion;
43
+
44
+ /**
45
+ @enum LODocumentUnits
46
+ @brief Defines the different units formats that are available.
47
+ */
48
+ typedef enum {
49
+ LODocumentUnits_FractionalInches = 0, ///< 6-1/2"
50
+ LODocumentUnits_DecimalInches, ///< 6.5"
51
+ LODocumentUnits_DecimalFeet, ///< 0.54167'
52
+ LODocumentUnits_DecimalMillimeters, ///< 165.1 mm
53
+ LODocumentUnits_DecimalCentimeters, ///< 16.51 cm
54
+ LODocumentUnits_DecimalMeters, ///< 1.651 m
55
+ LODocumentUnits_DecimalPoints, ///< 468 pt
56
+
57
+ LONumDocumentUnits
58
+ } LODocumentUnits;
59
+
60
+ #ifdef __cplusplus
61
+ extern "C" {
62
+ #endif
63
+
64
+ /**
65
+ @brief Creates a new empty document object. It will contain one page and one
66
+ layer.
67
+ @param[out] document The newly created document.
68
+ @return
69
+ - \ref SU_ERROR_NONE on success
70
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if document is NULL
71
+ - \ref SU_ERROR_OVERWRITE_VALID if *document already refers to a valid object
72
+ */
73
+ LO_RESULT LODocumentCreateEmpty(LODocumentRef* document);
74
+
75
+ /**
76
+ @brief Creates a new document object by loading an existing .layout file.
77
+ @param[out] document The document created from the .layout file.
78
+ @param[in] path The path to the .layout file on disk.
79
+ @return
80
+ - \ref SU_ERROR_NONE on success
81
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if document is NULL
82
+ - \ref SU_ERROR_OVERWRITE_VALID if *document already refers to a valid object
83
+ - \ref SU_ERROR_NULL_POINTER_INPUT if path is NULL
84
+ - \ref SU_ERROR_NO_DATA if the .layout file could not be found
85
+ - \ref SU_ERROR_SERIALIZATION if there was an error reading the .layout file
86
+ */
87
+ LO_RESULT LODocumentCreateFromFile(LODocumentRef* document, const char* path);
88
+
89
+ /**
90
+ @brief Creates a new document object using an existing .layout file as a
91
+ template. This differs from LODocumentCreateFromFile in that the new
92
+ document won't have a path until it is saved for the first time.
93
+ @param[out] document The document created using the .layout file as a template.
94
+ @param[in] path The path to the layout template file on disk.
95
+ @return
96
+ - \ref SU_ERROR_NONE on success
97
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if document is NULL
98
+ - \ref SU_ERROR_OVERWRITE_VALID if *document already refers to a valid object
99
+ - \ref SU_ERROR_NULL_POINTER_INPUT if path is NULL
100
+ - \ref SU_ERROR_SERIALIZATION if there was an error reading the template file
101
+ - \ref SU_ERROR_NO_DATA if the .layout file could not be found
102
+ */
103
+ LO_RESULT LODocumentCreateFromTemplate(LODocumentRef* document, const char* path);
104
+
105
+ /**
106
+ @brief Releases a document object. The object will be invalidated if
107
+ releasing the last reference. Note: it is important to call
108
+ LODocumentRelease before calling \ref LOTerminate, otherwise
109
+ LODocumentRelease may fail unpredictably.
110
+ @param[in] document The document object.
111
+ @return
112
+ - \ref SU_ERROR_NONE on success
113
+ - \ref SU_ERROR_NULL_POINTER_INPUT if document is NULL
114
+ - \ref SU_ERROR_INVALID_INPUT if *document does not refer to a valid object
115
+ */
116
+ LO_RESULT LODocumentRelease(LODocumentRef* document);
117
+
118
+ /**
119
+ @brief Adds a reference to an document object.
120
+ @since LayOut 2018, API 3.0
121
+ @param[in] document The document object.
122
+ @return
123
+ - \ref SU_ERROR_NONE on success
124
+ - \ref SU_ERROR_INVALID_INPUT if document does not refer to a valid object
125
+ */
126
+ LO_RESULT LODocumentAddReference(LODocumentRef document);
127
+
128
+ /**
129
+ @brief Saves a document to a file at the given path. Passing an empty path
130
+ string will save the document at its current path.
131
+ @param[in] document The document object.
132
+ @param[in] path The file path where the document should be saved.
133
+ @param[in] version The file version to save the file as.
134
+ @return
135
+ - \ref SU_ERROR_NONE on success
136
+ - \ref SU_ERROR_INVALID_INPUT if document does not refer to a valid object
137
+ - \ref SU_ERROR_NULL_POINTER_INPUT if path is NULL
138
+ - \ref SU_ERROR_OUT_OF_RANGE if version is not a valid version
139
+ - \ref SU_ERROR_SERIALIZATION if there was an error writing the file. This may
140
+ be due to the LayOut file being open in the LayOut application
141
+ */
142
+ LO_RESULT LODocumentSaveToFile(LODocumentRef document, const char* path, LODocumentVersion version);
143
+
144
+ /**
145
+ @brief Exports the document to a .pdf file at the indicated path. If a valid
146
+ options dictionary object is provided, then it can specify additional
147
+ PDF export options. The following options (declared in
148
+ documentexportoptions.h) may be specified in the options dictionary to
149
+ override their default values:
150
+ - <b>key: \ref LOExportOption_StartPage, value: Int32</b>\n
151
+ Start page index. Defaults to 0.
152
+ - <b>key: \ref LOExportOption_EndPage, value: Int32</b>\n
153
+ End page index. Defaults to the index of the last page in the document.
154
+ - <b>key: \ref LOExportOption_CompressImages, value: Bool</b>\n
155
+ If true, images (including raster models) will be compressed using JPEG
156
+ compression to reduce PDF file size. Defaults to true.
157
+ - <b>key: \ref LOExportOption_ImageCompressionQuality, value: Double</b>\n
158
+ Specifies the image compression quality from 0.0 to 1.0, to be used if
159
+ the \ref LOExportOption_CompressImages option is set to true. Defaults to
160
+ 0.5.
161
+
162
+ @param[in] document The document object.
163
+ @param[in] path The file path where the pdf should be exported.
164
+ @param[in] options_dict The options dictionary. If the dictionary object is
165
+ invalid then default options will be used.
166
+ @return
167
+ - \ref SU_ERROR_NONE on success
168
+ - \ref SU_ERROR_INVALID_INPUT if document does not refer to a valid object
169
+ - \ref SU_ERROR_NULL_POINTER_INPUT if path is NULL
170
+ - \ref SU_ERROR_GENERIC if an option was specified using a value of the wrong
171
+ type
172
+ - \ref SU_ERROR_OUT_OF_RANGE if the \ref LOExportOption_StartPage option
173
+ specifies a start page that is out of range
174
+ - \ref SU_ERROR_OUT_OF_RANGE if the \ref LOExportOption_EndPage option
175
+ specifies an end page that is out of range
176
+ - \ref SU_ERROR_OUT_OF_RANGE if the \ref LOExportOption_ImageCompressionQuality
177
+ option specifies a value that is out of range
178
+ - \ref SU_ERROR_SERIALIZATION if there was an error writing the file
179
+ */
180
+ LO_RESULT LODocumentExportToPDF(
181
+ LODocumentRef document, const char* path, LODictionaryRef options_dict);
182
+
183
+
184
+ /**
185
+ @brief Exports the document as a series of image files at the indicated path.
186
+ For multi-page documents, each page will append its page number to
187
+ base_name to use as the file name. If a valid options dictionary object
188
+ is provided, then it can specify additional image export options. The
189
+ following options (declared in documentexportoptions.h) may be specified
190
+ in the options dictionary to override their default values:
191
+ - <b>key: \ref LOExportOption_StartPage, value: Int32</b>\n
192
+ Start page index. Defaults to 0.
193
+ - <b>key: \ref LOExportOption_EndPage, value: Int32</b>\n
194
+ End page index. Defaults to the index of the last page in the document.
195
+ - <b>key: \ref LOExportOption_DPI, value: Int32</b>\n
196
+ Image DPI. This will determine the pixel dimensions of the output images,
197
+ in conjunction with the document's page width and height. Defaults to 96.
198
+
199
+ @param[in] document The document object.
200
+ @param[in] export_path The directory path to where the images should be
201
+ exported.
202
+ @param[in] base_name The base name for the image files.
203
+ @param[in] format What file format the images should be exported to.
204
+ @param[in] options_dict The options dictionary. If the dictionary object is
205
+ invalid then default options will be used.
206
+ @return
207
+ - \ref SU_ERROR_NONE on success
208
+ - \ref SU_ERROR_INVALID_INPUT if document does not refer to a valid object
209
+ - \ref SU_ERROR_NULL_POINTER_INPUT if export_path is NULL
210
+ - \ref SU_ERROR_NULL_POINTER_INPUT if base_name is NULL
211
+ - \ref SU_ERROR_OUT_OF_RANGE if format is out of range
212
+ - \ref SU_ERROR_GENERIC if an option was specified using a value of the wrong
213
+ type
214
+ - \ref SU_ERROR_OUT_OF_RANGE if the \ref LOExportOption_StartPage option
215
+ specifies a start page that is out of range
216
+ - \ref SU_ERROR_OUT_OF_RANGE if the \ref LOExportOption_EndPage option
217
+ specifies an end page that is out of range
218
+ - \ref SU_ERROR_OUT_OF_RANGE if the \ref LOExportOption_DPI option specifies a
219
+ DPI that is is less than 1 or greater than 1200
220
+ - \ref SU_ERROR_SERIALIZATION if there was an error writing the file(s)
221
+ */
222
+ LO_RESULT LODocumentExportToImageSet(
223
+ LODocumentRef document, const char* export_path, const char* base_name,
224
+ LOImageRepOutputFormat format, LODictionaryRef options_dict);
225
+
226
+ /**
227
+ @brief Gets the full path to a document's .layout file.
228
+ @param[in] document The document object.
229
+ @param[out] path The path to the document's .layout file.
230
+ @return
231
+ - \ref SU_ERROR_NONE on success
232
+ - \ref SU_ERROR_INVALID_INPUT if document does not refer to a valid object
233
+ - \ref SU_ERROR_NO_DATA if document is a new document that does not yet have a
234
+ path
235
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if path is NULL
236
+ - \ref SU_ERROR_INVALID_OUTPUT if *path does not refer to a valid string
237
+ object.
238
+ */
239
+ LO_RESULT LODocumentGetFilePath(LODocumentRef document, SUStringRef* path);
240
+
241
+ /**
242
+ @brief Gets the number of layers in a document.
243
+ @param[in] document The document object.
244
+ @param[out] num_layers The number of layers in the document.
245
+ @return
246
+ - \ref SU_ERROR_NONE on success
247
+ - \ref SU_ERROR_INVALID_INPUT if document does not refer to a valid object
248
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if num_layers is NULL
249
+ */
250
+ LO_RESULT LODocumentGetNumberOfLayers(LODocumentRef document, size_t* num_layers);
251
+
252
+ /**
253
+ @brief Gets a reference to the layer definition at the given index for a
254
+ document.
255
+ @param[in] document The document object.
256
+ @param[in] index The index of the layer to get.
257
+ @param[out] layer_definition The layer definition at the given index.
258
+ @return
259
+ - \ref SU_ERROR_NONE on success
260
+ - \ref SU_ERROR_INVALID_INPUT if document does not refer to a valid object
261
+ - \ref SU_ERROR_OUT_OF_RANGE if index is out of range
262
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if layer_definition is NULL
263
+ - \ref SU_ERROR_OVERWRITE_VALID if *layer_definition already refers to a valid
264
+ object
265
+ */
266
+ LO_RESULT LODocumentGetLayerAtIndex(
267
+ LODocumentRef document, size_t index, LOLayerRef* layer_definition);
268
+
269
+ /**
270
+ @brief Populates a \ref LOLayerListRef with all of the layer definitions in a
271
+ document.
272
+ @param[in] document The document object.
273
+ @param[out] layer_definitions The list to populate with the layer definitions
274
+ in the document.
275
+ @return
276
+ - \ref SU_ERROR_NONE on success
277
+ - \ref SU_ERROR_INVALID_INPUT if document does not refer to a valid object
278
+ - \ref SU_ERROR_INVALID_OUTPUT if layer_definitions does not refer to a valid
279
+ object
280
+ */
281
+ LO_RESULT LODocumentGetLayers(LODocumentRef document, LOLayerListRef layer_definitions);
282
+
283
+ /**
284
+ @brief Gets a reference to the document's active layer definition.
285
+ @since LayOut 2018, API 3.0
286
+ @param[in] document The document object.
287
+ @param[out] layer_definition The active layer definition in the document.
288
+ @return
289
+ - \ref SU_ERROR_NONE on success
290
+ - \ref SU_ERROR_INVALID_INPUT if document does not refer to a valid object
291
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if layer_definition is NULL
292
+ */
293
+ LO_RESULT LODocumentGetActiveLayer(LODocumentRef document, LOLayerRef* layer_definition);
294
+
295
+ /**
296
+ @brief Sets the document's active layer definition.
297
+ @since LayOut 2018, API 3.0
298
+ @param[in] document The document object.
299
+ @param[in] layer_definition The layer definition to set as active.
300
+ @return
301
+ - \ref SU_ERROR_NONE on success
302
+ - \ref SU_ERROR_INVALID_INPUT if document does not refer to a valid object
303
+ - \ref SU_ERROR_INVALID_INPUT if layer_definition does not refer to a valid
304
+ object
305
+ - \ref SU_ERROR_GENERIC if layer_definition does not belong to document
306
+ - \ref SU_ERROR_GENERIC if layer_definition is locked the active page
307
+ */
308
+ LO_RESULT LODocumentSetActiveLayer(LODocumentRef document, LOLayerRef layer_definition);
309
+
310
+ /**
311
+ @brief Moves a layer to a different index within a document's list of layers.
312
+ This will move the layer such that its new index becomes new_index.
313
+ @param[in] document The document object.
314
+ @param[in] layer_definition The layer definition object.
315
+ @param[in] new_index The index to move the layer to.
316
+ @return
317
+ - \ref SU_ERROR_NONE on success
318
+ - \ref SU_ERROR_INVALID_INPUT if document does not refer to a valid object
319
+ - \ref SU_ERROR_INVALID_INPUT if layer_definition does not refer to a valid
320
+ object
321
+ - \ref SU_ERROR_GENERIC if layer_definition does not belong to document
322
+ - \ref SU_ERROR_OUT_OF_RANGE if new_index is out of range
323
+ */
324
+ LO_RESULT LODocumentReorderLayer(
325
+ LODocumentRef document, LOLayerRef layer_definition, size_t new_index);
326
+ /**
327
+ @brief Adds a new layer to the document. The user is not responsible for
328
+ releasing the returned layer definition object.
329
+ @param[in] document The document object.
330
+ @param[in] shared Whether or not the new layer should be a shared
331
+ layer.
332
+ @param[out] layer_definition The new layer definition object.
333
+ @return
334
+ - \ref SU_ERROR_NONE on success
335
+ - \ref SU_ERROR_INVALID_INPUT if document does not refer to a valid object
336
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if layer_definition is NULL
337
+ - \ref SU_ERROR_OVERWRITE_VALID if *layer_definition already refers to a valid
338
+ object
339
+ */
340
+ LO_RESULT LODocumentAddLayer(LODocumentRef document, bool shared, LOLayerRef* layer_definition);
341
+
342
+ /**
343
+ @brief Removes a layer from a document. There must be at least one other
344
+ unlocked and visible layer on every page. If this is not the case, then
345
+ the next layer will be automatically unlocked and made visible on all
346
+ pages as necessary to proceed with the operation. *layer_definition will
347
+ be set to invalid by this function.
348
+ @param[in] document The document object.
349
+ @param[in] layer_definition The layer definition object.
350
+ @param[in] delete_entities Whether or not to delete the entities on the layer
351
+ that is being removed. If the entities are not
352
+ deleted, they will be moved to the next valid
353
+ layer. This may cause groups to be split if the
354
+ next valid layer does not have the same sharedness
355
+ as the layer being removed.
356
+ @return
357
+ - \ref SU_ERROR_NONE on success
358
+ - \ref SU_ERROR_INVALID_INPUT if document does not refer to a valid object
359
+ - \ref SU_ERROR_NULL_POINTER_INPUT if layer_definition is NULL
360
+ - \ref SU_ERROR_INVALID_INPUT if *layer_definition does not refer to a valid
361
+ object
362
+ - \ref SU_ERROR_GENERIC if *layer_definition does not belong to document
363
+ - \ref SU_ERROR_GENERIC if *layer_definition could not be removed because it is
364
+ the last layer in the document
365
+ - \ref SU_ERROR_GENERIC if the layer could not be removed because it would
366
+ break the rule that there must be at least one unlocked, visible layer on
367
+ each page
368
+ */
369
+ LO_RESULT LODocumentRemoveLayer(
370
+ LODocumentRef document, LOLayerRef* layer_definition, bool delete_entities);
371
+
372
+ /**
373
+ @brief Gets the page info object for a document.
374
+ @param[in] document The document object.
375
+ @param[out] page_info The page info object for the document.
376
+ @return
377
+ - \ref SU_ERROR_NONE on success
378
+ - \ref SU_ERROR_INVALID_INPUT if document does not refer to a valid object
379
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if page_info is NULL
380
+ - \ref SU_ERROR_OVERWRITE_VALID if *page_info already refers to a valid object
381
+ */
382
+ LO_RESULT LODocumentGetPageInfo(LODocumentRef document, LOPageInfoRef* page_info);
383
+
384
+ /**
385
+ @brief Gets the grid object for a document.
386
+ @param[in] document The document object.
387
+ @param[out] grid The grid object for the document.
388
+ @return
389
+ - \ref SU_ERROR_NONE on success
390
+ - \ref SU_ERROR_INVALID_INPUT if document does not refer to a valid object
391
+ - \ref SU_ERROR_NULL_POINTER_INPUT if grid is NULL
392
+ - \ref SU_ERROR_OVERWRITE_VALID if *grid already refers to a valid object
393
+ */
394
+ LO_RESULT LODocumentGetGrid(LODocumentRef document, LOGridRef* grid);
395
+
396
+ /**
397
+ @brief Gets the total number of pages in a document.
398
+ @param[in] document The document object.
399
+ @param[out] num_pages The number of pages.
400
+ @return
401
+ - \ref SU_ERROR_NONE on success
402
+ - \ref SU_ERROR_INVALID_INPUT if document does not refer to a valid object
403
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if num_pages is NULL
404
+ */
405
+ LO_RESULT LODocumentGetNumberOfPages(LODocumentRef document, size_t* num_pages);
406
+
407
+ /**
408
+ @brief Gets the page at a given index in a document.
409
+ @param[in] document The document object.
410
+ @param[in] index The index of the page to get.
411
+ @param[out] page The page object.
412
+ @return
413
+ - \ref SU_ERROR_NONE on success
414
+ - \ref SU_ERROR_INVALID_INPUT if document does not refer to a valid object
415
+ - \ref SU_ERROR_OUT_OF_RANGE if index is out of range
416
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if page is NULL
417
+ - \ref SU_ERROR_OVERWRITE_VALID if *page already refers to a valid object
418
+ */
419
+ LO_RESULT LODocumentGetPageAtIndex(LODocumentRef document, size_t index, LOPageRef* page);
420
+
421
+ /**
422
+ @brief Populates a \ref LOPageListRef object with all the pages in a document.
423
+ @param[in] document The document object.
424
+ @param[out] pages The list to populate with the pages in the document.
425
+ @return
426
+ - \ref SU_ERROR_NONE on success
427
+ - \ref SU_ERROR_INVALID_INPUT if document does not refer to a valid object
428
+ - \ref SU_ERROR_INVALID_OUTPUT if pages does not refer to a valid object
429
+ */
430
+ LO_RESULT LODocumentGetPages(LODocumentRef document, LOPageListRef pages);
431
+
432
+ /**
433
+ @brief Gets a reference to the page that will be shown the next time the
434
+ document is opened in LayOut.
435
+ @since LayOut 2018, API 3.0
436
+ @param[in] document The document object.
437
+ @param[out] page The active page in the document.
438
+ @return
439
+ - \ref SU_ERROR_NONE on success
440
+ - \ref SU_ERROR_INVALID_INPUT if document does not refer to a valid object
441
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if page is NULL
442
+ */
443
+ LO_RESULT LODocumentGetInitialPage(LODocumentRef document, LOPageRef* page);
444
+
445
+ /**
446
+ @brief Sets the page that will be shown the next time the document is opened in
447
+ LayOut.
448
+ @since LayOut 2018, API 3.0
449
+ @param[in] document The document object.
450
+ @param[in] page The page to set as active.
451
+ @return
452
+ - \ref SU_ERROR_NONE on success
453
+ - \ref SU_ERROR_INVALID_INPUT if document does not refer to a valid object
454
+ - \ref SU_ERROR_INVALID_INPUT if page does not refer to a valid object
455
+ - \ref SU_ERROR_GENERIC if page does not belong to document
456
+ */
457
+ LO_RESULT LODocumentSetInitialPage(LODocumentRef document, LOPageRef page);
458
+
459
+ /**
460
+ @brief Adds a new page to a document. The user is not responsible for releasing
461
+ the returned page object.
462
+ @param[in] document The document object.
463
+ @param[out] page The page object.
464
+ @return
465
+ - \ref SU_ERROR_NONE on success
466
+ - \ref SU_ERROR_INVALID_INPUT if document does not refer to a valid object
467
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if page is NULL
468
+ - \ref SU_ERROR_OVERWRITE_VALID if *page already refers to a valid object
469
+ */
470
+ LO_RESULT LODocumentAddPage(LODocumentRef document, LOPageRef* page);
471
+
472
+ /**
473
+ @brief Removes a page from a document. *page will be set to invalid by this
474
+ function.
475
+ @param[in] document The document object.
476
+ @param[in] page The page object.
477
+ @return
478
+ - \ref SU_ERROR_NONE on success
479
+ - \ref SU_ERROR_INVALID_INPUT if document does not refer to a valid object
480
+ - \ref SU_ERROR_NULL_POINTER_INPUT if page is NULL
481
+ - \ref SU_ERROR_INVALID_INPUT if *page does not refer to a valid object
482
+ - \ref SU_ERROR_GENERIC if *page does not belong to document
483
+ - \ref SU_ERROR_GENERIC if *page could not be removed because it is the last
484
+ page in the document
485
+ */
486
+ LO_RESULT LODocumentRemovePage(LODocumentRef document, LOPageRef* page);
487
+
488
+ /**
489
+ @brief Moves a page to a different index within a document's list of pages.
490
+ This will move the page such that its new index becomes new_index.
491
+ @param[in] document The document object.
492
+ @param[in] page The page object.
493
+ @param[in] new_index The index the page should be moved to.
494
+ @return
495
+ - \ref SU_ERROR_NONE on success
496
+ - \ref SU_ERROR_INVALID_INPUT if document does not refer to a valid object
497
+ - \ref SU_ERROR_INVALID_INPUT if page does not refer to a valid object
498
+ - \ref SU_ERROR_GENERIC if page does not belong to document
499
+ - \ref SU_ERROR_OUT_OF_RANGE if new_index is out of range
500
+ */
501
+ LO_RESULT LODocumentReorderPage(LODocumentRef document, LOPageRef page, size_t new_index);
502
+
503
+ /**
504
+ @brief Adds an entity to a document and place it on the given layer and page.
505
+ If the given layer is a shared layer then page may be an invalid object.
506
+ The entity must not already belong to a document. If entity is a group,
507
+ then the group along with all of its children will be added to the
508
+ document.
509
+ @param[in] document The document object.
510
+ @param[in] entity The entity object.
511
+ @param[in] layer_definition The layer definition object.
512
+ @param[in] page The page object.
513
+ @return
514
+ - \ref SU_ERROR_NONE on success
515
+ - \ref SU_ERROR_INVALID_INPUT if document does not refer to a valid object
516
+ - \ref SU_ERROR_INVALID_INPUT if entity does not refer to a valid object
517
+ - \ref SU_ERROR_INVALID_INPUT if layer_definition does not refer to a valid
518
+ object
519
+ - \ref SU_ERROR_INVALID_INPUT if page does not refer to a valid object and
520
+ layer_definition refers to a non-shared layer
521
+ - \ref SU_ERROR_GENERIC if page or layer_definition does not belong to document
522
+ - \ref SU_ERROR_GENERIC if entity already belongs to a document
523
+ */
524
+ LO_RESULT LODocumentAddEntity(
525
+ LODocumentRef document, LOEntityRef entity, LOLayerRef layer_definition, LOPageRef page);
526
+
527
+ /**
528
+ @brief Adds an entity to a document and places it on the layer at layer_index
529
+ and page at page_index. If the specified layer is a shared layer then
530
+ page_index will be ignored. The entity must not already belong to a
531
+ document. If entity is a group, then the group along with all of its
532
+ children will be added to the document.
533
+ @param[in] document The document object.
534
+ @param[in] entity The entity object.
535
+ @param[in] layer_index The layer definition index.
536
+ @param[in] page_index The page index.
537
+ @return
538
+ - \ref SU_ERROR_NONE on success
539
+ - \ref SU_ERROR_INVALID_INPUT if document does not refer to a valid object
540
+ - \ref SU_ERROR_INVALID_INPUT if entity does not refer to a valid object
541
+ - \ref SU_ERROR_OUT_OF_RANGE if layer_index is not a valid value
542
+ - \ref SU_ERROR_OUT_OF_RANGE if page_index is not a valid value and the layer at
543
+ layer_index is a non-shared layer
544
+ - \ref SU_ERROR_GENERIC if entity already belongs to a document
545
+ */
546
+ LO_RESULT LODocumentAddEntityUsingIndexes(
547
+ LODocumentRef document, LOEntityRef entity, size_t layer_index, size_t page_index);
548
+
549
+ /**
550
+ @brief Removes an entity from a document. If entity is a group, then the group
551
+ and all of its children will be removed from the document.
552
+ @param[in] document The document object.
553
+ @param[in] entity The entity object.
554
+ @return
555
+ - \ref SU_ERROR_NONE on success
556
+ - \ref SU_ERROR_INVALID_INPUT if document does not refer to a valid object
557
+ - \ref SU_ERROR_NULL_POINTER_INPUT if entity is NULL
558
+ - \ref SU_ERROR_INVALID_INPUT if *entity does not refer to a valid object
559
+ - \ref SU_ERROR_GENERIC if entity does not belong to document
560
+ */
561
+ LO_RESULT LODocumentRemoveEntity(LODocumentRef document, LOEntityRef* entity);
562
+
563
+ /**
564
+ @brief Gets the number of entities on shared layers at the top of a document's
565
+ group hierarchy. This count will include \ref LOGroupRef entities so the
566
+ group hierarchy can be traversed.
567
+ @param[in] document The document object.
568
+ @param[out] num_shared_entities The number of shared entities.
569
+ @return
570
+ - \ref SU_ERROR_NONE on success
571
+ - \ref SU_ERROR_INVALID_INPUT if document does not refer to a valid object
572
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if num_shared_entities is NULL
573
+ */
574
+ LO_RESULT LODocumentGetNumberOfSharedEntities(LODocumentRef document, size_t* num_shared_entities);
575
+
576
+ /**
577
+ @brief Gets the shared entity at the top of a document's group hierarchy at the
578
+ specified index.
579
+ @param[in] document The document object.
580
+ @param[in] index The 0-based entity index for the desired shared entity.
581
+ @param[out] entity The entity object.
582
+ @return
583
+ - \ref SU_ERROR_NONE on success
584
+ - \ref SU_ERROR_INVALID_INPUT if document does not refer to a valid object
585
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if entity is NULL
586
+ - \ref SU_ERROR_OVERWRITE_VALID if *entity already refers to a valid object
587
+ - \ref SU_ERROR_OUT_OF_RANGE if index is greater than or equal to the number of
588
+ shared entities returned by LODocumentGetNumberOfSharedEntities
589
+ */
590
+ LO_RESULT LODocumentGetSharedEntityAtIndex(
591
+ LODocumentRef document, size_t index, LOEntityRef* entity);
592
+
593
+ /**
594
+ @brief Populates a \ref LOEntityListRef with the entities on shared layers
595
+ at the top of a document's group hierarchy. This will include
596
+ \ref LOGroupRef entities so the group hierarchy can be traversed.
597
+ @param[in] document The document object.
598
+ @param[in] entity_list The entity list to populate.
599
+ @return
600
+ - \ref SU_ERROR_NONE on success
601
+ - \ref SU_ERROR_INVALID_INPUT if document does not refer to a valid object
602
+ - \ref SU_ERROR_INVALID_OUTPUT if entity_list does not refer to a valid object
603
+ */
604
+ LO_RESULT LODocumentGetSharedEntities(LODocumentRef document, LOEntityListRef entity_list);
605
+
606
+ /**
607
+ @brief Gets whether or not object snap is enabled in a document.
608
+ @param[in] document The document object.
609
+ @param[out] object_snap Whether object snap is enabled or not.
610
+ @return
611
+ - \ref SU_ERROR_NONE on success
612
+ - \ref SU_ERROR_INVALID_INPUT if document does not refer to a valid object
613
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if object_snap is NULL
614
+ */
615
+ LO_RESULT LODocumentGetObjectSnap(LODocumentRef document, bool* object_snap);
616
+
617
+ /**
618
+ @brief Sets whether or not object snap is enabled in a document.
619
+ @param[in] document The document object.
620
+ @param[in] object_snap Whether to enable or disable object snap.
621
+ @return
622
+ - \ref SU_ERROR_NONE on success
623
+ - \ref SU_ERROR_INVALID_INPUT if document does not refer to a valid object
624
+ */
625
+ LO_RESULT LODocumentSetObjectSnap(LODocumentRef document, bool object_snap);
626
+
627
+ /**
628
+ @brief Gets whether or not grid snap is enabled in a document.
629
+ @param[in] document The document object.
630
+ @param[out] grid_snap Whether grid snap is enabled or not.
631
+ @return
632
+ - \ref SU_ERROR_NONE on success
633
+ - \ref SU_ERROR_INVALID_INPUT if document does not refer to a valid object
634
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if grid_snap is NULL
635
+ */
636
+ LO_RESULT LODocumentGetGridSnap(LODocumentRef document, bool* grid_snap);
637
+
638
+ /**
639
+ @brief Sets whether or not grid snap is enabled in a document.
640
+ @param[in] document The document object.
641
+ @param[in] grid_snap Whether to enable or disable grid snap.
642
+ @return
643
+ - \ref SU_ERROR_NONE on success
644
+ - \ref SU_ERROR_INVALID_INPUT if document does not refer to a valid object
645
+ */
646
+ LO_RESULT LODocumentSetGridSnap(LODocumentRef document, bool grid_snap);
647
+
648
+ /**
649
+ @brief Returns the time at which a document was created.
650
+ @param[in] document The document object.
651
+ @param[out] time_created The time when the document was created.
652
+ @return
653
+ - \ref SU_ERROR_NONE on success
654
+ - \ref SU_ERROR_INVALID_INPUT if document does not refer to a valid object
655
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if time_created is NULL
656
+ */
657
+ LO_RESULT LODocumentGetTimeCreated(LODocumentRef document, time_t* time_created);
658
+
659
+ /**
660
+ @brief Returns the last time that the document was edited.
661
+ @param[in] document The document object.
662
+ @param[out] time_modified The last time the document was edited.
663
+ @return
664
+ - \ref SU_ERROR_NONE on success
665
+ - \ref SU_ERROR_INVALID_INPUT if document does not refer to a valid object
666
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if time_modified is NULL
667
+ */
668
+ LO_RESULT LODocumentGetTimeModified(LODocumentRef document, time_t* time_modified);
669
+
670
+ /**
671
+ @brief Returns the last time that the document was printed or exported.
672
+ @param[in] document The document object.
673
+ @param[out] time_published The last time the document was printed or exported.
674
+ @return
675
+ - \ref SU_ERROR_NONE on success
676
+ - \ref SU_ERROR_INVALID_INPUT if document does not refer to a valid object
677
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if time_published is NULL
678
+ */
679
+ LO_RESULT LODocumentGetTimePublished(LODocumentRef document, time_t* time_published);
680
+
681
+ /**
682
+ @brief Gets the units and precision for a document.
683
+ @param[in] document The document object.
684
+ @param[out] units The units setting for the document.
685
+ @param[out] precision The units precision. This is expressed as a value in the
686
+ current units.
687
+ @return
688
+ - \ref SU_ERROR_NONE on success
689
+ - \ref SU_ERROR_INVALID_INPUT if document does not refer to a valid object
690
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if units is NULL
691
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if precision is NULL
692
+ */
693
+ LO_RESULT LODocumentGetUnits(LODocumentRef document, LODocumentUnits* units, double* precision);
694
+
695
+ /**
696
+ @brief Sets the units and precision for a document.
697
+ @param[in] document The document object.
698
+ @param[in] units The units setting for the document.
699
+ @param[in] precision The units precision. This is expressed as a value in the
700
+ specified units. LayOut only allows for a finite set of
701
+ precision values for each units setting, so it will set
702
+ the precision to the closest valid setting for the
703
+ specified units. See the "Units" section of LayOut's
704
+ "Document Setup" dialog for a reference of the available
705
+ precisions for each units setting.
706
+ @return
707
+ - \ref SU_ERROR_NONE on success
708
+ - \ref SU_ERROR_INVALID_INPUT if document does not refer to a valid object
709
+ - \ref SU_ERROR_OUT_OF_RANGE if units is invalid
710
+ */
711
+ LO_RESULT LODocumentSetUnits(LODocumentRef document, LODocumentUnits units, double precision);
712
+
713
+
714
+ /**
715
+ @brief Gets the number of auto-text definitions in a document.
716
+ @since LayOut 2017, API 2.0
717
+ @param[in] document The document object.
718
+ @param[out] size The amount of auto-text definitions in the document.
719
+ @return
720
+ - \ref SU_ERROR_NONE on success
721
+ - \ref SU_ERROR_INVALID_INPUT if document does not refer to a valid object
722
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if size is NULL
723
+ */
724
+ LO_RESULT LODocumentGetNumberOfAutoTextDefinitions(LODocumentRef document, size_t* size);
725
+
726
+ /**
727
+ @brief Gets the auto-text at the specified index.
728
+ @since LayOut 2017, API 2.0
729
+ @param[in] document The document object.
730
+ @param[in] index The index of the auto-text object.
731
+ @param[out] autotext The auto-text object.
732
+ @return
733
+ - \ref SU_ERROR_NONE on success
734
+ - \ref SU_ERROR_INVALID_INPUT if document does not refer to a valid object
735
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if autotext is NULL
736
+ - \ref SU_ERROR_OUT_OF_RANGE if index is not a valid index
737
+ */
738
+ LO_RESULT LODocumentGetAutoTextDefinitionAtIndex(
739
+ LODocumentRef document, size_t index, LOAutoTextDefinitionRef* autotext);
740
+
741
+ /**
742
+ @brief Gets the auto-text with the specified name.
743
+ @since LayOut 2018, API 3.0
744
+ @param[in] document The document object.
745
+ @param[in] name The name of the auto-text object to get.
746
+ @param[out] autotext The auto-text object.
747
+ @return
748
+ - \ref SU_ERROR_NONE on success
749
+ - \ref SU_ERROR_INVALID_INPUT if document does not refer to a valid object
750
+ - \ref SU_ERROR_NULL_POINTER_INPUT if name is NULL
751
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if autotext is NULL
752
+ - \ref SU_ERROR_NO_DATA if no auto-text definition exists with the given name
753
+ */
754
+ LO_RESULT LODocumentGetAutoTextDefinitionByName(
755
+ LODocumentRef document, const char* name, LOAutoTextDefinitionRef* autotext);
756
+
757
+ /**
758
+ @brief Populates a \ref LOAutoTextDefinitionListRef object with all the auto-text
759
+ in a document.
760
+ @since LayOut 2018, API 3.0
761
+ @param[in] document The document object.
762
+ @param[out] autotexts The list to populate with the auto-texts in the document.
763
+ @return
764
+ - \ref SU_ERROR_NONE on success
765
+ - \ref SU_ERROR_INVALID_INPUT if document does not refer to a valid object
766
+ - \ref SU_ERROR_INVALID_OUTPUT if auto_texts does not refer to a valid object
767
+ */
768
+ LO_RESULT LODocumentGetAutoTextDefinitions(
769
+ LODocumentRef document, LOAutoTextDefinitionListRef autotexts);
770
+
771
+ /**
772
+ @brief Adds an auto-text definition to a document.
773
+ @since LayOut 2017, API 2.0
774
+ @param[in] document The document object.
775
+ @param[in] type The desired type of the new auto-text.
776
+ @param[in] name The desired name of the new auto-text.
777
+ @param[out] autotext The autotext definition object.
778
+ @return
779
+ - \ref SU_ERROR_NONE on success
780
+ - \ref SU_ERROR_INVALID_INPUT if document does not refer to a valid object
781
+ - \ref SU_ERROR_INVALID_INPUT is autotext does not refer to a valid object
782
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if index is NULL
783
+ - \ref SU_ERROR_OUT_OF_RANGE if type is not a valid type
784
+ - \ref SU_ERROR_UNSUPPORTED if type is a mandatory auto-text type
785
+ */
786
+ LO_RESULT LODocumentAddAutoTextDefinition(
787
+ LODocumentRef document, int type, const char* name, LOAutoTextDefinitionRef* autotext);
788
+
789
+ /**
790
+ @brief Removes an auto-text definition from a document.
791
+ @since LayOut 2017, API 2.0
792
+ @param[in] document The document object.
793
+ @param[in] autotext The auto-text definition object.
794
+ @param[in] convert_tags_to_normal_text True if the auto-text being deleted
795
+ should retain its tags in normal text.
796
+ @return
797
+ - \ref SU_ERROR_NONE on success
798
+ - \ref SU_ERROR_INVALID_INPUT if document does not refer to a valid object
799
+ - \ref SU_ERROR_NULL_POINTER_INPUT if autotext is NULL
800
+ - \ref SU_ERROR_INVALID_INPUT if autotext does not refer to a valid object
801
+ - \ref SU_ERROR_UNSUPPORTED if autotext is a mandatory auto-text definition
802
+ - \ref SU_ERROR_INVALID_ARGUMENT if autotext does not belong to this document
803
+ */
804
+ LO_RESULT LODocumentRemoveAutoTextDefinition(
805
+ LODocumentRef document, LOAutoTextDefinitionRef* autotext, bool convert_tags_to_normal_text);
806
+
807
+ /**
808
+ @brief Gets the length formatter settings from the document. The given length
809
+ formatter object must have been constructed using \ref
810
+ SULengthFormatterCreate. It must be released using \ref
811
+ SULengthFormatterRelease.
812
+ @since LayOut 2018, API 3.0
813
+ @param[in] document The document object.
814
+ @param[out] formatter The formatter to apply the document's settings to.
815
+ @return
816
+ - \ref SU_ERROR_NONE on success
817
+ - \ref SU_ERROR_INVALID_INPUT if document is not a valid object
818
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if formatter is NULL
819
+ - \ref SU_ERROR_INVALID_OUTPUT if formatter does not point to a valid \ref
820
+ SULengthFormatterRef object
821
+ */
822
+ LO_RESULT LODocumentGetLengthFormatter(LODocumentRef document, SULengthFormatterRef* formatter);
823
+
824
+
825
+ /**
826
+ @brief Gets the render mode override for export of SketchUp models in the document.
827
+
828
+ This is used to override the render mode for all \ref LOSketchUpModelRef s in the document when
829
+ exporting. To have the output render mode match each \ref LOSketchUpModelRef 's edit render mode,
830
+ set this to LOSketchUpModelRenderMode_NoOverride.
831
+ @since LayOut 2023.1, API 8.1
832
+ @param[in] document The document object.
833
+ @param[out] render_mode The render mode of the SketchUp model.
834
+ @return
835
+ - \ref SU_ERROR_NONE on success
836
+ - \ref SU_ERROR_INVALID_INPUT if \p document is not a valid object
837
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p render_mode is NULL
838
+ */
839
+ LO_RESULT LODocumentGetRenderModeOverride(
840
+ LODocumentRef document, LOSketchUpModelRenderMode* render_mode);
841
+
842
+ /**
843
+ @brief Sets the render mode override for export of SketchUp models in the document.
844
+
845
+ This is used to override the render mode for all raster rendered \ref LOSketchUpModelRef s in the
846
+ document when exporting. To have the output render mode match each \ref LOSketchUpModelRef 's edit
847
+ render mode, set this to LOSketchUpModelRenderMode_NoOverride.
848
+ @since LayOut 2023.1, API 8.1
849
+ @param[in] document The document object.
850
+ @param[in] render_mode The new render mode for the SketchUp model.
851
+ @return
852
+ - \ref SU_ERROR_NONE on success
853
+ - \ref SU_ERROR_INVALID_INPUT if \p document is not a valid object
854
+ - \ref SU_ERROR_OUT_OF_RANGE if the value of \p render_mode is invalid
855
+ - \ref SU_ERROR_INVALID_ARGUMENT if the value of \p render_mode is \ref
856
+ LOSketchUpModelRenderMode_Raster
857
+ */
858
+ LO_RESULT LODocumentSetRenderModeOverride(
859
+ LODocumentRef document, LOSketchUpModelRenderMode render_mode);
860
+ #ifdef __cplusplus
861
+ } // extern "C" {
862
+ #endif
863
+
864
+ #endif // LAYOUT_MODEL_DOCUMENT_H_