/// \param theTemporarily if it is true, do not store and name the added in the data framework
/// \param theCheckIfAttributeHasObject if it is true, the check isInList is called
/// It is useful for attribute selection
-MODULEBASE_EXPORT void setObject(const AttributePtr& theAttribute, const ObjectPtr& theObject,
+/// \return true if the attribute is filled with the given parameters
+MODULEBASE_EXPORT bool setObject(const AttributePtr& theAttribute, const ObjectPtr& theObject,
const std::shared_ptr<GeomAPI_Shape>& theShape,
ModuleBase_IWorkshop* theWorkshop,
const bool theTemporarily,