diff --git a/freecad/gears/features.py b/freecad/gears/features.py index 60558cc..627b157 100644 --- a/freecad/gears/features.py +++ b/freecad/gears/features.py @@ -83,7 +83,10 @@ class BaseGear(object): # Needed to make this object "attachable", # aka able to attach parameterically to other objects # cf. https://wiki.freecadweb.org/Scripted_objects_with_attachment - obj.addExtension('Part::AttachExtensionPython', obj) + if int(App.Version()[1]) >= 20: + obj.addExtension('Part::AttachExtensionPython') + else: + obj.addExtension('Part::AttachExtensionPython', obj) def execute(self, fp): # checksbackwardcompatibility: