using namespace std;
-namespace VISU{
+namespace VISU
+{
static std::string PREFIX(" ");
typedef std::map<std::string,std::string> TName2EntryMap;
if(anId == Result_i::eImportFile || anId == Result_i::eCopyAndImportFile){
switch(anId){
case Result_i::eImportFile:
- theStr<<thePrefix<<aName<<" = aVisu.ImportFile('"<<aFileName<<"')"<<endl;
+ //theStr<<thePrefix<<aName<<" = aVisu.ImportFile('"<<aFileName<<"')"<<endl;
+ theStr<<thePrefix<<aName<<" = aVisu.CreateResult('"<<aFileName<<"')"<<endl;
+
+ theStr<<thePrefix<<aName<<".SetBuildGroups("<<
+ aServant->IsGroupsDone()<<")"<<
+ endl;
+
+ theStr<<thePrefix<<aName<<".SetBuildFields("<<
+ aServant->IsFieldsDone()<<","<<
+ aServant->IsMinMaxDone()<<")"<<
+ endl;
+
+ theStr<<thePrefix<<aName<<".Build(0,1)"<<endl;
+
+ theStr<<thePrefix<<"if "<<aName<<".IsDone() :"<<endl;
break;
case Result_i::eCopyAndImportFile:
theStr<<thePrefix<<aName<<" = aVisu.CopyAndImportFile('"<<aFileName<<"')"<<endl;
+ theStr<<thePrefix<<"if "<<aName<<":"<<endl;
break;
}
- theStr<<thePrefix<<"if "<<aName<<":"<<endl;
thePrefix += PREFIX;
theArgumentName = aName;
aComment.latin1(),
true);
- if(!theIsAtOnce){
- if(theIsBuildGroups){
- aMesh->myGroupsEntry =
- CreateAttributes(theStudy,
- aMesh->myEntry,
- "",
- "",
- "",
- true);
- }
+ if(theIsBuildGroups){
+ aMesh->myGroupsEntry =
+ CreateAttributes(theStudy,
+ aMesh->myEntry,
+ "",
+ "",
+ "",
+ true);
+ }
- if(theIsBuildFields){
- aMesh->myFieldsEntry =
- CreateAttributes(theStudy,
- aMesh->myEntry,
- "",
- "",
- "",
- true);
- }
+ if(theIsBuildFields){
+ aMesh->myFieldsEntry =
+ CreateAttributes(theStudy,
+ aMesh->myEntry,
+ "",
+ "",
+ "",
+ true);
}
-
+
//Import entities
TMeshOnEntityMap::const_iterator aMeshOnEntityMapIter = aMeshOnEntityMap.begin();
for(; aMeshOnEntityMapIter != aMeshOnEntityMap.end(); aMeshOnEntityMapIter++){
aComment.sprintf("myComment=GROUPS;myMeshName=%s",
aMeshName.c_str());
- if(theIsAtOnce)
- aMesh->myGroupsEntry =
- CreateAttributes(theStudy,
- aMesh->myEntry,
- "",
- "Groups",
- aComment.latin1(),
- true);
- else
- UpdateAttributes(theStudy,
- aMesh->myGroupsEntry,
- "",
- "Groups",
- aComment.latin1());
+ UpdateAttributes(theStudy,
+ aMesh->myGroupsEntry,
+ "",
+ "Groups",
+ aComment.latin1());
TGroupMap::const_iterator aGroupMapIter = aGroupMap.begin();
for(; aGroupMapIter != aGroupMap.end(); aGroupMapIter++){
aComment.sprintf("myComment=FIELDS;myMeshName=%s",
aMeshName.c_str());
- if(theIsAtOnce)
- aMesh->myFieldsEntry =
- CreateAttributes(theStudy,
- aMesh->myEntry,
- "",
- "Fields",
- aComment.latin1(),
- true);
- else
- UpdateAttributes(theStudy,
- aMesh->myFieldsEntry,
- "",
- "Fields",
- aComment.latin1());
+ UpdateAttributes(theStudy,
+ aMesh->myFieldsEntry,
+ "",
+ "Fields",
+ aComment.latin1());
anIsFieldsEntryUpdated = true;
}