LayOut C API
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
document.h
Go to the documentation of this file.
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>
11 #include <time.h>
12 
23 typedef enum {
38 
40 
43 
48 typedef enum {
56 
59 
60 #ifdef __cplusplus
61 extern "C" {
62 #endif
63 
74 
87 LO_RESULT LODocumentCreateFromFile(LODocumentRef* document, const char* path);
88 
103 LO_RESULT LODocumentCreateFromTemplate(LODocumentRef* document, const char* path);
104 
117 
127 
142 LO_RESULT LODocumentSaveToFile(LODocumentRef document, const char* path, LODocumentVersion version);
143 
181  LODocumentRef document, const char* path, LODictionaryRef options_dict);
182 
183 
223  LODocumentRef document, const char* export_path, const char* base_name,
224  LOImageRepOutputFormat format, LODictionaryRef options_dict);
225 
240 
250 LO_RESULT LODocumentGetNumberOfLayers(LODocumentRef document, size_t* num_layers);
251 
267  LODocumentRef document, size_t index, LOLayerRef* layer_definition);
268 
281 LO_RESULT LODocumentGetLayers(LODocumentRef document, LOLayerListRef layer_definitions);
282 
293 LO_RESULT LODocumentGetActiveLayer(LODocumentRef document, LOLayerRef* layer_definition);
294 
308 LO_RESULT LODocumentSetActiveLayer(LODocumentRef document, LOLayerRef layer_definition);
309 
325  LODocumentRef document, LOLayerRef layer_definition, size_t new_index);
340 LO_RESULT LODocumentAddLayer(LODocumentRef document, bool shared, LOLayerRef* layer_definition);
341 
370  LODocumentRef document, LOLayerRef* layer_definition, bool delete_entities);
371 
383 
395 
405 LO_RESULT LODocumentGetNumberOfPages(LODocumentRef document, size_t* num_pages);
406 
419 LO_RESULT LODocumentGetPageAtIndex(LODocumentRef document, size_t index, LOPageRef* page);
420 
431 
444 
458 
471 
487 
501 LO_RESULT LODocumentReorderPage(LODocumentRef document, LOPageRef page, size_t new_index);
502 
525  LODocumentRef document, LOEntityRef entity, LOLayerRef layer_definition, LOPageRef page);
526 
547  LODocumentRef document, LOEntityRef entity, size_t layer_index, size_t page_index);
548 
562 
574 LO_RESULT LODocumentGetNumberOfSharedEntities(LODocumentRef document, size_t* num_shared_entities);
575 
591  LODocumentRef document, size_t index, LOEntityRef* entity);
592 
605 
615 LO_RESULT LODocumentGetObjectSnap(LODocumentRef document, bool* object_snap);
616 
625 LO_RESULT LODocumentSetObjectSnap(LODocumentRef document, bool object_snap);
626 
636 LO_RESULT LODocumentGetGridSnap(LODocumentRef document, bool* grid_snap);
637 
646 LO_RESULT LODocumentSetGridSnap(LODocumentRef document, bool grid_snap);
647 
657 LO_RESULT LODocumentGetTimeCreated(LODocumentRef document, time_t* time_created);
658 
668 LO_RESULT LODocumentGetTimeModified(LODocumentRef document, time_t* time_modified);
669 
679 LO_RESULT LODocumentGetTimePublished(LODocumentRef document, time_t* time_published);
680 
693 LO_RESULT LODocumentGetUnits(LODocumentRef document, LODocumentUnits* units, double* precision);
694 
711 LO_RESULT LODocumentSetUnits(LODocumentRef document, LODocumentUnits units, double precision);
712 
713 
725 
739  LODocumentRef document, size_t index, LOAutoTextDefinitionRef* autotext);
740 
755  LODocumentRef document, const char* name, LOAutoTextDefinitionRef* autotext);
756 
769  LODocumentRef document, LOAutoTextDefinitionListRef autotexts);
770 
787  LODocumentRef document, int type, const char* name, LOAutoTextDefinitionRef* autotext);
788 
805  LODocumentRef document, LOAutoTextDefinitionRef* autotext, bool convert_tags_to_normal_text);
806 
823 
824 
840  LODocumentRef document, LOSketchUpModelRenderMode* render_mode);
841 
859  LODocumentRef document, LOSketchUpModelRenderMode render_mode);
860 #ifdef __cplusplus
861 } // extern "C" {
862 #endif
863 
864 #endif // LAYOUT_MODEL_DOCUMENT_H_