From 2b81b5b1d8cddf451dc9f5516a4763fd1a0d4b11 Mon Sep 17 00:00:00 2001 From: smh Date: Mon, 17 May 2004 10:00:03 +0000 Subject: [PATCH] SMESH5895 --- src/SMESH_I/SMESH_Mesh_i.cxx | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/src/SMESH_I/SMESH_Mesh_i.cxx b/src/SMESH_I/SMESH_Mesh_i.cxx index 9ca6f208a..9b3352a64 100644 --- a/src/SMESH_I/SMESH_Mesh_i.cxx +++ b/src/SMESH_I/SMESH_Mesh_i.cxx @@ -1104,9 +1104,25 @@ void SMESH_Mesh_i::ExportMED(const char *file, CORBA::Boolean auto_groups) throw char* aMeshName = NULL; SALOMEDS::SObject_var aMeshSO = SALOMEDS::SObject::_narrow( aStudy->FindObjectIOR( ( SMESH_Gen_i::GetORB()->object_to_string( _this() ) ) ) ); - if ( !aMeshSO->_is_nil() ) - aMeshName = aMeshSO->GetName(); - + if ( !aMeshSO->_is_nil() ) + { + aMeshName = aMeshSO->GetName(); + //SCRUTE(file); + //SCRUTE(aMeshName); + //SCRUTE(aMeshSO->GetID()); + SALOMEDS::GenericAttribute_var anAttr; + SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder(); + SALOMEDS::AttributeExternalFileDef_var aFileName; + anAttr=aStudyBuilder->FindOrCreateAttribute(aMeshSO, "AttributeExternalFileDef"); + aFileName = SALOMEDS::AttributeExternalFileDef::_narrow(anAttr); + ASSERT(!aFileName->_is_nil()); + aFileName->SetValue(file); + SALOMEDS::AttributeFileType_var aFileType; + anAttr=aStudyBuilder->FindOrCreateAttribute(aMeshSO, "AttributeFileType"); + aFileType = SALOMEDS::AttributeFileType::_narrow(anAttr); + ASSERT(!aFileType->_is_nil()); + aFileType->SetValue("FICHIERMED"); + } _impl->ExportMED( file, aMeshName, auto_groups ); } -- 2.39.2