- SessionPtr aSession = ModelAPI_Session::get();
- DocumentPtr aDocument = aSession->activeDocument();
- ObjectPtr aParamObj = aDocument->objectByName(ModelAPI_ResultParameter::group(),
- theName.toStdString());
- ResultParameterPtr aParam = std::dynamic_pointer_cast<ModelAPI_ResultParameter>(aParamObj);
- if(!aParam.get())
- return false;
- AttributeDoublePtr aValueAttribute = aParam->data()->real(ModelAPI_ResultParameter::VALUE());
- outValue = aValueAttribute->value();
- return true;