1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // Name : ExchangeAPI_Export.cpp
7 // 07/06/16 - Sergey POKHODENKO - Creation of the file
9 //--------------------------------------------------------------------------------------
10 #include "ExchangeAPI_Export.h"
11 //--------------------------------------------------------------------------------------
12 #include <ModelHighAPI_Tools.h>
13 //--------------------------------------------------------------------------------------
14 void exportToFile(const std::shared_ptr<ModelAPI_Document> & thePart,
15 const std::string & theFilePath,
16 const std::list<ModelHighAPI_Selection> & theSelectionList,
17 const std::string & theFileFormat)
19 std::shared_ptr<ModelAPI_Feature> aFeature =
20 thePart->addFeature(ExchangePlugin_ExportFeature::ID());
21 fillAttribute("Regular", aFeature->string(ExchangePlugin_ExportFeature::EXPORT_TYPE_ID()));
22 fillAttribute(theFilePath, aFeature->string(ExchangePlugin_ExportFeature::FILE_PATH_ID()));
23 fillAttribute(theSelectionList,
24 aFeature->selectionList(ExchangePlugin_ExportFeature::SELECTION_LIST_ID()));
25 fillAttribute(theFileFormat, aFeature->string(ExchangePlugin_ExportFeature::FILE_FORMAT_ID()));
29 void exportToXAO(const std::shared_ptr<ModelAPI_Document> & thePart,
30 const std::string & theFilePath,
31 const std::string & theAuthor,
32 const std::string & theGeometryName)
34 std::shared_ptr<ModelAPI_Feature> aFeature =
35 thePart->addFeature(ExchangePlugin_ExportFeature::ID());
36 fillAttribute("XAO", aFeature->string(ExchangePlugin_ExportFeature::EXPORT_TYPE_ID()));
37 fillAttribute(theFilePath, aFeature->string(ExchangePlugin_ExportFeature::XAO_FILE_PATH_ID()));
38 fillAttribute(theAuthor, aFeature->string(ExchangePlugin_ExportFeature::XAO_AUTHOR_ID()));
39 fillAttribute(theGeometryName,
40 aFeature->string(ExchangePlugin_ExportFeature::XAO_GEOMETRY_NAME_ID()));
41 fillAttribute("XAO", aFeature->string(ExchangePlugin_ExportFeature::FILE_FORMAT_ID()));
45 //--------------------------------------------------------------------------------------