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 
222  LODocumentRef document, const char* export_path, const char* base_name,
223  LOImageRepOutputFormat format, LODictionaryRef options_dict);
224 
239 
249 LO_RESULT LODocumentGetNumberOfLayers(LODocumentRef document, size_t* num_layers);
250 
266  LODocumentRef document, size_t index, LOLayerRef* layer_definition);
267 
280 LO_RESULT LODocumentGetLayers(LODocumentRef document, LOLayerListRef layer_definitions);
281 
292 LO_RESULT LODocumentGetActiveLayer(LODocumentRef document, LOLayerRef* layer_definition);
293 
307 LO_RESULT LODocumentSetActiveLayer(LODocumentRef document, LOLayerRef layer_definition);
308 
324  LODocumentRef document, LOLayerRef layer_definition, size_t new_index);
339 LO_RESULT LODocumentAddLayer(LODocumentRef document, bool shared, LOLayerRef* layer_definition);
340 
369  LODocumentRef document, LOLayerRef* layer_definition, bool delete_entities);
370 
382 
394 
404 LO_RESULT LODocumentGetNumberOfPages(LODocumentRef document, size_t* num_pages);
405 
418 LO_RESULT LODocumentGetPageAtIndex(LODocumentRef document, size_t index, LOPageRef* page);
419 
430 
443 
457 
470 
486 
500 LO_RESULT LODocumentReorderPage(LODocumentRef document, LOPageRef page, size_t new_index);
501 
524  LODocumentRef document, LOEntityRef entity, LOLayerRef layer_definition, LOPageRef page);
525 
546  LODocumentRef document, LOEntityRef entity, size_t layer_index, size_t page_index);
547 
561 
573 LO_RESULT LODocumentGetNumberOfSharedEntities(LODocumentRef document, size_t* num_shared_entities);
574 
590  LODocumentRef document, size_t index, LOEntityRef* entity);
591 
604 
614 LO_RESULT LODocumentGetObjectSnap(LODocumentRef document, bool* object_snap);
615 
624 LO_RESULT LODocumentSetObjectSnap(LODocumentRef document, bool object_snap);
625 
635 LO_RESULT LODocumentGetGridSnap(LODocumentRef document, bool* grid_snap);
636 
645 LO_RESULT LODocumentSetGridSnap(LODocumentRef document, bool grid_snap);
646 
656 LO_RESULT LODocumentGetTimeCreated(LODocumentRef document, time_t* time_created);
657 
667 LO_RESULT LODocumentGetTimeModified(LODocumentRef document, time_t* time_modified);
668 
678 LO_RESULT LODocumentGetTimePublished(LODocumentRef document, time_t* time_published);
679 
692 LO_RESULT LODocumentGetUnits(LODocumentRef document, LODocumentUnits* units, double* precision);
693 
710 LO_RESULT LODocumentSetUnits(LODocumentRef document, LODocumentUnits units, double precision);
711 
712 
724 
738  LODocumentRef document, size_t index, LOAutoTextDefinitionRef* autotext);
739 
754  LODocumentRef document, const char* name, LOAutoTextDefinitionRef* autotext);
755 
768  LODocumentRef document, LOAutoTextDefinitionListRef autotexts);
769 
786  LODocumentRef document, int type, const char* name, LOAutoTextDefinitionRef* autotext);
787 
804  LODocumentRef document, LOAutoTextDefinitionRef* autotext, bool convert_tags_to_normal_text);
805 
822 
823 
839  LODocumentRef document, LOSketchUpModelRenderMode* render_mode);
840 
858  LODocumentRef document, LOSketchUpModelRenderMode render_mode);
859 
875  LODocumentRef document, const char* dictionary_name, LODictionaryRef* dictionary);
876 
893  LODocumentRef document, const char* dictionary_name, const char* key, LOTypedValueRef value_in);
894 
912  LODocumentRef document, const char* dictionary_name, const char* key,
913  LOTypedValueRef value_out);
914 
929  LODocumentRef document, const char* dictionary_name, const char* key);
930 
931 #ifdef __cplusplus
932 } // extern "C" {
933 #endif
934 
935 #endif // LAYOUT_MODEL_DOCUMENT_H_