1 // Copyright (C) 2014-2019 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #include <ExchangePlugin_ExportFeature.h>
30 #include <Config_Common.h>
31 #include <Config_PropManager.h>
33 #include <GeomAlgoAPI_BREPExport.h>
34 #include <GeomAlgoAPI_CompoundBuilder.h>
35 #include <GeomAlgoAPI_IGESExport.h>
36 #include <GeomAlgoAPI_STEPExport.h>
37 #include <GeomAlgoAPI_Tools.h>
38 #include <GeomAlgoAPI_XAOExport.h>
40 #include <GeomAPI_Shape.h>
41 #include <GeomAPI_ShapeExplorer.h>
42 #include <GeomAPI_Trsf.h>
44 #include <ModelAPI_AttributeSelectionList.h>
45 #include <ModelAPI_AttributeString.h>
46 #include <ModelAPI_AttributeStringArray.h>
47 #include <ModelAPI_AttributeIntArray.h>
48 #include <ModelAPI_AttributeTables.h>
49 #include <ModelAPI_Data.h>
50 #include <ModelAPI_Document.h>
51 #include <ModelAPI_Object.h>
52 #include <ModelAPI_ResultBody.h>
53 #include <ModelAPI_ResultPart.h>
54 #include <ModelAPI_ResultGroup.h>
55 #include <ModelAPI_ResultField.h>
56 #include <ModelAPI_Session.h>
57 #include <ModelAPI_Validator.h>
58 #include <ModelAPI_Tools.h>
60 #include <Events_InfoMessage.h>
62 #include <XAO_Group.hxx>
63 #include <XAO_Field.hxx>
64 #include <XAO_Xao.hxx>
65 #include <XAO_Geometry.hxx>
67 #include <ExchangePlugin_Tools.h>
69 ExchangePlugin_ExportFeature::ExchangePlugin_ExportFeature()
73 ExchangePlugin_ExportFeature::~ExchangePlugin_ExportFeature()
75 // TODO Auto-generated destructor stub
79 * Request for initialization of data model of the feature: adding all attributes
81 void ExchangePlugin_ExportFeature::initAttributes()
83 data()->addAttribute(ExchangePlugin_ExportFeature::EXPORT_TYPE_ID(),
84 ModelAPI_AttributeString::typeId());
85 data()->addAttribute(ExchangePlugin_ExportFeature::FILE_PATH_ID(),
86 ModelAPI_AttributeString::typeId());
87 data()->addAttribute(ExchangePlugin_ExportFeature::XAO_FILE_PATH_ID(),
88 ModelAPI_AttributeString::typeId());
89 data()->addAttribute(ExchangePlugin_ExportFeature::FILE_FORMAT_ID(),
90 ModelAPI_AttributeString::typeId());
91 data()->addAttribute(ExchangePlugin_ExportFeature::SELECTION_LIST_ID(),
92 ModelAPI_AttributeSelectionList::typeId());
93 data()->addAttribute(ExchangePlugin_ExportFeature::XAO_AUTHOR_ID(),
94 ModelAPI_AttributeString::typeId());
95 data()->addAttribute(ExchangePlugin_ExportFeature::XAO_GEOMETRY_NAME_ID(),
96 ModelAPI_AttributeString::typeId());
97 data()->addAttribute(ExchangePlugin_ExportFeature::XAO_SELECTION_LIST_ID(),
98 ModelAPI_AttributeSelectionList::typeId());
100 ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(),
101 ExchangePlugin_ExportFeature::XAO_FILE_PATH_ID());
102 ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(),
103 ExchangePlugin_ExportFeature::XAO_AUTHOR_ID());
104 ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(),
105 ExchangePlugin_ExportFeature::XAO_GEOMETRY_NAME_ID());
106 ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(),
107 ExchangePlugin_ExportFeature::XAO_SELECTION_LIST_ID());
109 // to support previous version of document, move the selection list
110 // if the type of export operation is XAO
111 AttributeStringPtr aTypeAttr = string(EXPORT_TYPE_ID());
112 if (aTypeAttr->isInitialized() && aTypeAttr->value() == "XAO") {
113 AttributeSelectionListPtr aSelList = selectionList(SELECTION_LIST_ID());
114 AttributeSelectionListPtr aXAOSelList = selectionList(XAO_SELECTION_LIST_ID());
115 if (aSelList->size() > 0 && aXAOSelList->size() == 0)
116 aSelList->copyTo(aXAOSelList);
121 void ExchangePlugin_ExportFeature::attributeChanged(const std::string& theID)
123 if (theID == XAO_FILE_PATH_ID()) {
124 string(ExchangePlugin_ExportFeature::FILE_PATH_ID())->setValue(
125 string(ExchangePlugin_ExportFeature::XAO_FILE_PATH_ID())->value());
130 * Computes or recomputes the results
132 void ExchangePlugin_ExportFeature::execute()
134 AttributeStringPtr aFormatAttr =
135 this->string(ExchangePlugin_ExportFeature::FILE_FORMAT_ID());
136 std::string aFormat = aFormatAttr->value();
138 AttributeStringPtr aFilePathAttr =
139 this->string(ExchangePlugin_ExportFeature::FILE_PATH_ID());
140 std::string aFilePath = aFilePathAttr->value();
141 if (aFilePath.empty())
144 exportFile(aFilePath, aFormat);
147 void ExchangePlugin_ExportFeature::exportFile(const std::string& theFileName,
148 const std::string& theFormat)
150 std::string aFormatName = theFormat;
152 if (aFormatName.empty()) { // get default format for the extension
154 std::string anExtension = GeomAlgoAPI_Tools::File_Tools::extension(theFileName);
155 if (anExtension == "BREP" || anExtension == "BRP") {
156 aFormatName = "BREP";
157 } else if (anExtension == "STEP" || anExtension == "STP") {
158 aFormatName = "STEP";
159 } else if (anExtension == "IGES" || anExtension == "IGS") {
160 aFormatName = "IGES-5.1";
162 aFormatName = anExtension;
166 if (aFormatName == "XAO") {
167 exportXAO(theFileName);
171 // make shape for export from selected shapes
172 AttributeSelectionListPtr aSelectionListAttr =
173 this->selectionList(ExchangePlugin_ExportFeature::SELECTION_LIST_ID());
174 std::list<GeomShapePtr> aShapes;
175 for (int i = 0, aSize = aSelectionListAttr->size(); i < aSize; ++i) {
176 AttributeSelectionPtr anAttrSelection = aSelectionListAttr->value(i);
177 std::shared_ptr<GeomAPI_Shape> aCurShape = anAttrSelection->value();
178 if (aCurShape.get() == NULL)
179 aCurShape = anAttrSelection->context()->shape();
180 if (aCurShape.get() != NULL)
181 aShapes.push_back(aCurShape);
184 // Store compound if we have more than one shape.
185 std::shared_ptr<GeomAPI_Shape> aShape =
186 aShapes.size() == 1 ? aShapes.front() : GeomAlgoAPI_CompoundBuilder::compound(aShapes);
188 // Perform the export
190 bool aResult = false;
191 if (aFormatName == "BREP") {
192 aResult = BREPExport(theFileName, aFormatName, aShape, anError);
193 } else if (aFormatName == "STEP") {
194 aResult = STEPExport(theFileName, aFormatName, aShape, anError);
195 } else if (aFormatName.substr(0, 4) == "IGES") {
196 aResult = IGESExport(theFileName, aFormatName, aShape, anError);
198 anError = "Unsupported format: " + aFormatName;
201 if (!anError.empty()) {
202 setError("An error occurred while exporting " + theFileName + ": " + anError);
207 /// Returns XAO string by the value from the table
208 static std::string valToString(const ModelAPI_AttributeTables::Value& theVal,
209 const ModelAPI_AttributeTables::ValueType& theType) {
210 std::ostringstream aStr; // the resulting string value
212 case ModelAPI_AttributeTables::BOOLEAN:
213 aStr<<(theVal.myBool ? "true" : "false");
215 case ModelAPI_AttributeTables::INTEGER:
218 case ModelAPI_AttributeTables::DOUBLE:
219 aStr<<theVal.myDouble;
221 case ModelAPI_AttributeTables::STRING:
228 /// Returns true if something in selection is presented in the results list
229 static bool isInResults(AttributeSelectionListPtr theSelection,
230 const std::list<ResultPtr>& theResults,
231 std::set<ResultPtr>& theCashedResults)
233 // collect all results into a cashed set
234 if (theCashedResults.empty()) {
235 std::list<ResultPtr> aResults;
236 std::list<ResultPtr>::const_iterator aRes = theResults.cbegin();
237 for(; aRes != theResults.cend(); aRes++) {
238 if (theCashedResults.count(*aRes))
241 theCashedResults.insert(*aRes);
242 if ((*aRes)->groupName() == ModelAPI_ResultBody::group()) {
243 ResultBodyPtr aResBody = std::dynamic_pointer_cast<ModelAPI_ResultBody>(*aRes);
244 std::list<ResultPtr> aResults;
245 ModelAPI_Tools::allSubs(aResBody, aResults, false);
246 for(std::list<ResultPtr>::iterator aR = aResults.begin(); aR != aResults.end(); aR++) {
247 theCashedResults.insert(std::dynamic_pointer_cast<ModelAPI_ResultBody>(*aR));
249 } else if ((*aRes)->groupName() == ModelAPI_ResultPart::group()) { // all results of the part
250 ResultPartPtr aResPart = std::dynamic_pointer_cast<ModelAPI_ResultPart>(*aRes);
251 DocumentPtr aPartDoc = aResPart->partDoc();
252 if (!aPartDoc.get() || !aPartDoc->isOpened()) { // document is not accessible
255 int aBodyCount = aPartDoc->size(ModelAPI_ResultBody::group());
256 for (int aBodyIndex = 0; aBodyIndex < aBodyCount; ++aBodyIndex) {
257 ResultBodyPtr aResBody =
258 std::dynamic_pointer_cast<ModelAPI_ResultBody>(
259 aPartDoc->object(ModelAPI_ResultBody::group(), aBodyIndex));
260 if (aResBody.get()) {
261 theCashedResults.insert(aResBody);
262 std::list<ResultPtr> aResults;
263 ModelAPI_Tools::allSubs(aResBody, aResults, false);
264 for(std::list<ResultPtr>::iterator aR = aResults.begin(); aR != aResults.end(); aR++) {
265 theCashedResults.insert(std::dynamic_pointer_cast<ModelAPI_ResultBody>(*aR));
272 // if context is in results, return true
273 for(int a = 0; a < theSelection->size(); a++) {
274 AttributeSelectionPtr anAttr = theSelection->value(a);
275 ResultPtr aContext = anAttr->context();
276 // check is it group selected for groups BOP
277 if (aContext.get() && aContext->groupName() == ModelAPI_ResultGroup::group()) {
278 // it is impossible by used results check which result is used in this group result,
279 // so check the results shapes is it in results of this document or not
280 FeaturePtr aSelFeature =
281 std::dynamic_pointer_cast<ModelAPI_Feature>(theSelection->owner());
282 if (!aSelFeature.get() || aSelFeature->results().empty())
284 GeomShapePtr aGroupResShape = aSelFeature->firstResult()->shape();
286 std::set<ResultPtr>::iterator allResultsIter = theCashedResults.begin();
287 for(; allResultsIter != theCashedResults.end(); allResultsIter++) {
288 GeomShapePtr aResultShape = (*allResultsIter)->shape();
290 GeomAPI_Shape::ShapeType aType =
291 GeomAPI_Shape::shapeTypeByStr(theSelection->selectionType());
292 GeomAPI_ShapeExplorer aGroupResExp(aGroupResShape, aType);
293 for(; aGroupResExp.more(); aGroupResExp.next()) {
294 if (aResultShape->isSubShape(aGroupResExp.current(), false))
295 return true; // at least one shape of the group is in the used results
299 ResultBodyPtr aSelected = std::dynamic_pointer_cast<ModelAPI_ResultBody>(anAttr->context());
300 if (!aSelected.get()) { // try to get selected feature and all its results
301 FeaturePtr aContextFeature = anAttr->contextFeature();
302 if (aContextFeature.get() && !aContextFeature->results().empty()) {
303 const std::list<ResultPtr>& allResluts = aContextFeature->results();
304 std::list<ResultPtr>::const_iterator aResIter = allResluts.cbegin();
305 for(; aResIter != allResluts.cend(); aResIter++) {
306 if (aResIter->get() && theCashedResults.count(*aResIter))
310 } else if (aSelected.get() && theCashedResults.count(aSelected))
316 void ExchangePlugin_ExportFeature::exportXAO(const std::string& theFileName)
325 std::string anAuthor = string(ExchangePlugin_ExportFeature::XAO_AUTHOR_ID())->value();
326 aXao.setAuthor(anAuthor);
328 // make shape for export from all results
329 std::list<GeomShapePtr> aShapes;
330 std::list<ResultPtr> aResults;
331 std::list<DocumentPtr> aDocuments; /// documents of Parts selected and used in export
332 std::map<DocumentPtr, GeomTrsfPtr> aDocTrsf; /// translation of the part
334 AttributeSelectionListPtr aSelection = selectionList(XAO_SELECTION_LIST_ID());
335 bool aIsSelection = aSelection->isInitialized() && aSelection->size() > 0;
336 if (aIsSelection) { // a mode for export to geom result by result
337 for(int a = 0; a < aSelection->size(); a++) {
338 AttributeSelectionPtr anAttr = aSelection->value(a);
339 ResultPtr aBodyContext =
340 std::dynamic_pointer_cast<ModelAPI_Result>(anAttr->context());
341 if (aBodyContext.get() && !aBodyContext->isDisabled() && aBodyContext->shape().get()) {
342 aResults.push_back(aBodyContext);
343 GeomShapePtr aShape = anAttr->value();
345 aShape = aBodyContext->shape();
346 aShapes.push_back(aShape);
347 if (aBodyContext->groupName() == ModelAPI_ResultPart::group()) {
348 ResultPartPtr aResPart = std::dynamic_pointer_cast<ModelAPI_ResultPart>(aBodyContext);
349 DocumentPtr aPartDoc = aResPart->partDoc();
350 if (!aPartDoc.get() || !aPartDoc->isOpened()) { // document is not accessible
351 std::string msg = "Can not export XAO for not loaded part";
352 Events_InfoMessage("ExportFeature", msg, this).send();
355 aDocuments.push_back(aPartDoc);
356 aDocTrsf[aPartDoc] = aResPart->summaryTrsf();
362 int aBodyCount = document()->size(ModelAPI_ResultBody::group());
363 for (int aBodyIndex = 0; aBodyIndex < aBodyCount; ++aBodyIndex) {
364 ResultBodyPtr aResultBody =
365 std::dynamic_pointer_cast<ModelAPI_ResultBody>(
366 document()->object(ModelAPI_ResultBody::group(), aBodyIndex));
367 if (!aResultBody.get())
369 aShapes.push_back(aResultBody->shape());
370 aResults.push_back(aResultBody);
373 if (aShapes.empty()) {
374 setError("No shapes to export");
379 GeomShapePtr aShape = (aShapes.size() == 1)
381 : GeomAlgoAPI_CompoundBuilder::compound(aShapes);
383 SetShapeToXAO(aShape, &aXao, anError);
385 if (!anError.empty()) {
386 setError("An error occurred while exporting " + theFileName + ": " + anError);
391 std::string aGeometryName = string(ExchangePlugin_ExportFeature::XAO_GEOMETRY_NAME_ID())->value();
392 if (aGeometryName.empty() && aResults.size() == 1) {
393 // get the name from the first result
394 ResultPtr aResultBody = *aResults.begin();
395 aGeometryName = aResultBody->data()->name();
398 aXao.getGeometry()->setName(aGeometryName);
400 std::set<ResultPtr> allResultsCashed; // cash to speed up searching in all results selected
402 // iterate all documents used
403 if (aDocuments.empty())
404 aDocuments.push_back(document());
405 std::list<DocumentPtr>::iterator aDoc = aDocuments.begin();
406 for(; aDoc != aDocuments.end(); aDoc++) {
408 int aGroupCount = (*aDoc)->size(ModelAPI_ResultGroup::group());
409 for (int aGroupIndex = 0; aGroupIndex < aGroupCount; ++aGroupIndex) {
410 ResultGroupPtr aResultGroup = std::dynamic_pointer_cast<ModelAPI_ResultGroup>(
411 (*aDoc)->object(ModelAPI_ResultGroup::group(), aGroupIndex));
412 if (!aResultGroup.get() || !aResultGroup->shape().get())
415 FeaturePtr aGroupFeature = (*aDoc)->feature(aResultGroup);
417 AttributeSelectionListPtr aSelectionList =
418 aGroupFeature->selectionList("group_list");
419 if (!isInResults(aSelectionList, aResults, allResultsCashed))// skip group not used in result
422 // conversion of dimension
423 std::string aSelectionType = aSelectionList->selectionType();
424 GeomAPI_Shape::ShapeType aSelType = GeomAPI_Shape::shapeTypeByStr(aSelectionType);
425 std::string aDimensionString =
426 ExchangePlugin_Tools::selectionType2xaoDimension(aSelectionType);
427 XAO::Dimension aGroupDimension = XAO::XaoUtils::stringToDimension(aDimensionString);
429 XAO::Group* aXaoGroup = aXao.addGroup(aGroupDimension,
430 aResultGroup->data()->name());
433 GeomAPI_ShapeExplorer aGroupResExplorer(aResultGroup->shape(), aSelType);
434 for(; aGroupResExplorer.more(); aGroupResExplorer.next()) {
435 GeomShapePtr aGroupShape = aGroupResExplorer.current();
436 if (aDocTrsf.find(*aDoc) != aDocTrsf.end())
437 aGroupShape->move(aDocTrsf[*aDoc]);
438 int aReferenceID = GeomAlgoAPI_CompoundBuilder::id(aShape, aGroupShape);
439 if (aReferenceID == 0) // selected value does not found in the exported shape
441 std::string aReferenceString = XAO::XaoUtils::intToString(aReferenceID);
443 aXao.getGeometry()->getElementIndexByReference(aGroupDimension, aReferenceString);
444 aXaoGroup->add(anElementID);
446 } catch (XAO::XAO_Exception& e) {
448 std::string msg = "An error occurred while exporting group " +
449 aResultGroup->data()->name();
453 msg += "=> skipping this group from XAO export.";
454 Events_InfoMessage("ExportFeature", msg, this).send();
455 aXao.removeGroup(aXaoGroup);
461 int aFieldCount = (*aDoc)->size(ModelAPI_ResultField::group());
462 for (int aFieldIndex = 0; aFieldIndex < aFieldCount; ++aFieldIndex) {
463 ResultFieldPtr aResultField = std::dynamic_pointer_cast<ModelAPI_ResultField>(
464 (*aDoc)->object(ModelAPI_ResultField::group(), aFieldIndex));
466 FeaturePtr aFieldFeature = (*aDoc)->feature(aResultField);
468 AttributeSelectionListPtr aSelectionList =
469 aFieldFeature->selectionList("selected");
470 std::string aSelectionType = aSelectionList->selectionType();
471 bool isWholePart = aSelectionType == "part";
472 // skip field not used in results
473 if (!isWholePart && !isInResults(aSelectionList, aResults, allResultsCashed))
476 // conversion of dimension
477 std::string aDimensionString =
478 ExchangePlugin_Tools::selectionType2xaoDimension(aSelectionType);
479 XAO::Dimension aFieldDimension = XAO::XaoUtils::stringToDimension(aDimensionString);
480 // get tables and their type
481 std::shared_ptr<ModelAPI_AttributeTables> aTables = aFieldFeature->tables("values");
482 std::string aTypeString = ExchangePlugin_Tools::valuesType2xaoType(aTables->type());
483 XAO::Type aFieldType = XAO::XaoUtils::stringToFieldType(aTypeString);
485 XAO::Field* aXaoField = aXao.addField(aFieldType, aFieldDimension, aTables->columns(),
486 aResultField->data()->name());
490 // set components names
491 AttributeStringArrayPtr aComponents = aFieldFeature->stringArray("components_names");
492 for(int aComp = 0; aComp < aComponents->size(); aComp++) {
493 std::string aName = aComponents->value(aComp);
494 aXaoField->setComponentName(aComp, aName);
497 AttributeIntArrayPtr aStamps = aFieldFeature->intArray("stamps");
498 for (int aStepIndex = 0; aStepIndex < aTables->tables(); aStepIndex++) {
499 XAO::Step* aStep = aXaoField->addNewStep(aStepIndex + 1);
500 aStep->setStep(aStepIndex + 1);
501 int aStampIndex = aStamps->value(aStepIndex);
502 aStep->setStamp(aStampIndex);
503 int aNumElements = isWholePart ? aXaoField->countElements() : aTables->rows();
504 int aNumComps = aTables->columns();
505 std::set<int> aFilledIDs; // to fill the rest by defaults
506 // omit default values first row
507 for(int aRow = isWholePart ? 0 : 1; aRow < aNumElements; aRow++) {
508 for(int aCol = 0; aCol < aNumComps; aCol++) {
511 // element index actually is the ID of the selection
512 AttributeSelectionPtr aSelection = aSelectionList->value(aRow - 1);
513 int aReferenceID = GeomAlgoAPI_CompoundBuilder::id(aShape, aSelection->value());
514 if (aReferenceID == 0) // selected value does not found in the exported shape
517 std::string aReferenceString = XAO::XaoUtils::intToString(aReferenceID);
518 anElementID = aXao.getGeometry()->
519 getElementIndexByReference(aFieldDimension, aReferenceString);
522 ModelAPI_AttributeTables::Value aVal = aTables->value(
523 isWholePart ? 0 : aRow, aCol, aStepIndex);
524 std::string aStrVal = valToString(aVal, aTables->type());
525 aStep->setStringValue(isWholePart ? aRow : anElementID, aCol, aStrVal);
526 aFilledIDs.insert(anElementID);
529 if (!isWholePart) { // fill the rest values by default ones
530 XAO::GeometricElementList::iterator allElem =
531 aXao.getGeometry()->begin(aFieldDimension);
532 for(; allElem != aXao.getGeometry()->end(aFieldDimension); allElem++) {
533 if (aFilledIDs.find(allElem->first) != aFilledIDs.end())
535 for(int aCol = 0; aCol < aNumComps; aCol++) {
537 ModelAPI_AttributeTables::Value aVal = aTables->value(0, aCol, aStepIndex);
538 std::string aStrVal = valToString(aVal, aTables->type());
539 aStep->setStringValue(allElem->first, aCol, aStrVal);
544 } catch (XAO::XAO_Exception& e) {
546 std::string msg = "An error occurred while exporting field " +
547 aResultField->data()->name();
551 msg += "=> skipping this field from XAO export.";
552 Events_InfoMessage("ExportFeature", msg, this).send();
553 aXao.removeField(aXaoField);
560 XAOExport(theFileName, &aXao, anError);
562 if (!anError.empty()) {
563 setError("An error occurred while exporting " + theFileName + ": " + anError);
568 } catch (XAO::XAO_Exception& e) {
569 std::string anError = e.what();
570 setError("An error occurred while exporting " + theFileName + ": " + anError);
576 bool ExchangePlugin_ExportFeature::isMacro() const
578 if (!data().get() || !data()->isValid())
580 ExchangePlugin_ExportFeature* aThis = ((ExchangePlugin_ExportFeature*)(this));
581 AttributeStringPtr aFormatAttr = aThis->string(FILE_FORMAT_ID());
582 std::string aFormat(aFormatAttr.get() ? aFormatAttr->value() : "");
584 if (aFormat.empty()) { // get default format for the extension
585 AttributeStringPtr aFilePathAttr = aThis->string(FILE_PATH_ID());
586 std::string aFilePath = aFilePathAttr->value();
587 if (!aFilePath.empty()) {
588 std::string anExtension = GeomAlgoAPI_Tools::File_Tools::extension(aFilePath);
589 aFormat = anExtension;
593 if (aFormat == "XAO") { // on export to GEOm the selection attribute is filled - this is
594 // an exceptional case where export to XAO feature must be kept
595 AttributeSelectionListPtr aList = aThis->selectionList(XAO_SELECTION_LIST_ID());
596 return !aList->isInitialized() || aList->size() == 0;