theStr<<thePrefix<<"if "<<theName<<":"<<endl;
thePrefix += PREFIX;
+ // Add to Name->Object map
theStr<<thePrefix<<"aName2ObjectMap['"<<theName<<"'] = "<<theName<<endl;
+ // Set name (as this object could be renamed by user)
+ CORBA::String_var aNameInStudy = theSObject->GetName();
+ theStr<<thePrefix<<"visu.SetName("<<theName<<",'"<<aNameInStudy.in()<<"')"<<endl;
+
+ // Set parameters
theStr<<thePrefix<<theName<<".SetScalarMode("<<theServant->GetScalarMode()<<")"<<endl;
switch(theServant->GetScaling()){
theStr<<thePrefix<<"if "<<aName<<":"<<endl;
std::string aPrefix2 = thePrefix + PREFIX;
+ // Set name (as this object could be renamed by user)
+ CORBA::String_var aNameInStudy = theSObject->GetName();
+ theStr<<thePrefix<<aName<<".SetTitle('"<<aNameInStudy.in()<<"') # 1"<<endl;
+
DumpChildrenToPython(theStudy,
theIsPublished,
theIsValidScript,
theStr<<thePrefix<<"if "<<aName<<":"<<endl;
thePrefix += PREFIX;
+ // Add to Name->Object map
theStr<<thePrefix<<"aName2ObjectMap['"<<aName<<"'] = "<<aName<<endl;
+ // Set name (as this object could be renamed by user)
+ CORBA::String_var aNameInStudy = theSObject->GetName();
+ theStr<<thePrefix<<"visu.SetName("<<aName<<",'"<<aNameInStudy.in()<<"')"<<endl;
+
+ // Set presentation parameters
SALOMEDS::Color aColor;
aColor = aServant->GetCellColor();
theStr<<thePrefix<<aName<<".SetCellColor(SALOMEDS.Color("<<
return;
case VISU::TTABLE:
if(Table_i* aServant = dynamic_cast<Table_i*>(GetServant(anObj).in())){
- SALOMEDS::SObject_var aSObject = aServant->GetSObject();
SALOMEDS::GenericAttribute_var anAttr;
if(theSObject->FindAttribute(anAttr,"AttributeComment")){
using namespace SALOMEDS;
theStr<<thePrefix<<"anID = aSObject.GetID()"<<endl;
theStr<<thePrefix<<aName<<" = aVisu.CreateTable(anID)"<<endl;
+
+ // Set name (as this object could be renamed by user)
+ CORBA::String_var aNameInStudy = theSObject->GetName();
+ theStr<<thePrefix<<aName<<".SetTitle('"<<aNameInStudy.in()<<"') # 2"<<endl;
+
theStr<<endl;
theArgumentName = aName;
theStr<<thePrefix<<"anID = aSObject.GetID()"<<endl;
theStr<<thePrefix<<aName<<" = aVisu.CreateTable(anID)"<<endl;
+
+ // Set name (as this object could be renamed by user)
+ CORBA::String_var aNameInStudy = theSObject->GetName();
+ theStr<<thePrefix<<aName<<".SetTitle('"<<aNameInStudy.in()<<"') # 3"<<endl;
+
theStr<<endl;
theArgumentName = aName;
return;
}
}
- }else{
+ }else{ /*if(!CORBA::is_nil(anObj))*/
SALOMEDS::GenericAttribute_var anAttr;
if(theSObject->FindAttribute(anAttr,"AttributeComment")){
SALOMEDS::AttributeComment_var aComment =
std::string aPrefix = thePrefix + PREFIX;
theArgumentName = aName;
+ // Set name (as this object could be renamed by user)
+ CORBA::String_var aNameInStudy = aSObject->GetName();
+ theStr<<aPrefix<<"visu.SetName("<<aName<<",'"<<aNameInStudy.in()<<"')"<<endl;
+
SALOMEDS::ChildIterator_var aCurveIter = theStudy->NewChildIterator(aSObject);
for(aCurveIter->InitEx(false); aCurveIter->More(); aCurveIter->Next()){
SALOMEDS::SObject_var aRefSObj = aCurveIter->Value();