1 // Name : ExchangeAPI_Export.cpp
5 // 07/06/16 - Sergey POKHODENKO - Creation of the file
7 //--------------------------------------------------------------------------------------
8 #include "ExchangeAPI_Export.h"
9 //--------------------------------------------------------------------------------------
10 #include <ModelHighAPI_Tools.h>
11 //--------------------------------------------------------------------------------------
12 void exportToFile(const std::shared_ptr<ModelAPI_Document> & thePart,
13 const std::string & theFilePath,
14 const std::list<ModelHighAPI_Selection> & theSelectionList,
15 const std::string & theFileFormat)
17 // TODO(spo): check that thePart is not empty
18 std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(ExchangePlugin_ExportFeature::ID());
19 fillAttribute(theFilePath, aFeature->string(ExchangePlugin_ExportFeature::FILE_PATH_ID()));
20 fillAttribute(theSelectionList, aFeature->selectionList(ExchangePlugin_ExportFeature::SELECTION_LIST_ID()));
21 fillAttribute(theFileFormat, aFeature->string(ExchangePlugin_ExportFeature::FILE_FORMAT_ID()));
25 void exportToXAO(const std::shared_ptr<ModelAPI_Document> & thePart,
26 const std::string & theFilePath,
27 const std::string & theAuthor,
28 const std::string & theGeometryName)
30 // TODO(spo): check that thePart is not empty
31 std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(ExchangePlugin_ExportFeature::ID());
32 fillAttribute(theFilePath, aFeature->string(ExchangePlugin_ExportFeature::FILE_PATH_ID()));
33 fillAttribute(theAuthor, aFeature->string(ExchangePlugin_ExportFeature::XAO_AUTHOR_ID()));
34 fillAttribute(theGeometryName, aFeature->string(ExchangePlugin_ExportFeature::XAO_GEOMETRY_NAME_ID()));
38 //--------------------------------------------------------------------------------------