for ( ; it != anExprParams.end(); it++) {
double aValue;
ResultParameterPtr aParamRes;
+ // If variable does not exist python interpreter will generate an error. It is OK.
if (!ModelAPI_Tools::findVariable(*it, aValue, aParamRes, theDocument)) continue;
std::ostringstream sstream;
std::shared_ptr<ModelAPI_ObjectRenamedMessage> aMessage =
std::dynamic_pointer_cast<ModelAPI_ObjectRenamedMessage>(theMessage);
- if (!aMessage.get() || aMessage->oldName().empty() || aMessage->newName().empty())
+ // Empty new name is not available too but it will be rejected by
+ // name validator in isValidAttribute.
+ if (!aMessage.get() || aMessage->oldName().empty())
return;
// check if the renamed object is a result parameter