const std::string& theSubMeshName, // Family or Group name
const std::string& theNewName)
{
- if (myStudyDocument->GetProperties()->IsLocked())
- return;
-
Result_i* aResult = dynamic_cast<Result_i*>(GetServant(theResult).in());
if (!aResult)
return;
+ SALOMEDS::Study_var aStudyDocument = aResult->GetStudyDocument();
+ if (aStudyDocument->GetProperties()->IsLocked())
+ return;
+
+
QString aComment;
VISU::VISUType aType;
if (theEntity >= 0)
if (anEntry == "")
return;
- SALOMEDS::SObject_ptr aSObject = myStudyDocument->FindObjectID(anEntry.c_str());
+ SALOMEDS::SObject_ptr aSObject = aStudyDocument->FindObjectID(anEntry.c_str());
- SALOMEDS::StudyBuilder_var aStudyBuilder = myStudyDocument->NewBuilder();
+ SALOMEDS::StudyBuilder_var aStudyBuilder = aStudyDocument->NewBuilder();
aStudyBuilder->NewCommand(); // There is a transaction
SALOMEDS::GenericAttribute_var anAttr =
const char* theMeshName,
VISU::Entity theEntity)
{
- if(myStudyDocument->GetProperties()->IsLocked())
- return Mesh::_nil();
+ Result_i* aResult = dynamic_cast<Result_i*>(GetServant(theResult).in());
+ if (!aResult)
+ return VISU::Mesh::_nil();
+
+ SALOMEDS::Study_var aStudyDocument = aResult->GetStudyDocument();
+ if (aStudyDocument->GetProperties()->IsLocked())
+ return VISU::Mesh::_nil();
+
+ Mesh_i* aPresent = new Mesh_i();
+ if(aPresent->Create(aResult, theMeshName, theEntity))
+ return aPresent->_this();
+ else
+ aPresent->_remove_ref();
- if(Result_i* aResult = dynamic_cast<Result_i*>(GetServant(theResult).in())){
- Mesh_i* aPresent = new Mesh_i();
- if(aPresent->Create(aResult, theMeshName, theEntity))
- return aPresent->_this();
- else{
- aPresent->_remove_ref();
- }
- }
return VISU::Mesh::_nil();
}
VISU::Entity theEntity,
const char* theFamilyName)
{
- if(myStudyDocument->GetProperties()->IsLocked())
- return Mesh::_nil();
+ Result_i* aResult = dynamic_cast<Result_i*>(GetServant(theResult).in());
+ if (!aResult)
+ return VISU::Mesh::_nil();
+
+ SALOMEDS::Study_var aStudyDocument = aResult->GetStudyDocument();
+ if (aStudyDocument->GetProperties()->IsLocked())
+ return VISU::Mesh::_nil();
+
+ Mesh_i* aPresent = new Mesh_i();
+ if(aPresent->Create(aResult, theMeshName, theEntity, theFamilyName))
+ return aPresent->_this();
+ else
+ aPresent->_remove_ref();
- if(Result_i* aResult = dynamic_cast<Result_i*>(GetServant(theResult).in())){
- Mesh_i* aPresent = new Mesh_i();
- if(aPresent->Create(aResult, theMeshName, theEntity, theFamilyName))
- return aPresent->_this();
- else{
- aPresent->_remove_ref();
- }
- }
return VISU::Mesh::_nil();
}
const char* theMeshName,
const char* theGroupName)
{
- if(myStudyDocument->GetProperties()->IsLocked())
- return Mesh::_nil();
+ Result_i* aResult = dynamic_cast<Result_i*>(GetServant(theResult).in());
+ if (!aResult)
+ return VISU::Mesh::_nil();
+
+ SALOMEDS::Study_var aStudyDocument = aResult->GetStudyDocument();
+ if (aStudyDocument->GetProperties()->IsLocked())
+ return VISU::Mesh::_nil();
+
+ Mesh_i* aPresent = new Mesh_i();
+ if(aPresent->Create(aResult, theMeshName, theGroupName))
+ return aPresent->_this();
+ else
+ aPresent->_remove_ref();
- if(Result_i* aResult = dynamic_cast<Result_i*>(GetServant(theResult).in())){
- Mesh_i* aPresent = new Mesh_i();
- if(aPresent->Create(aResult, theMeshName, theGroupName))
- return aPresent->_this();
- else{
- aPresent->_remove_ref();
- }
- }
return VISU::Mesh::_nil();
}