obj.InList return a list, so the check if len(list) > 0, i'm assuming that only a "parent" object links to this object, if there are many (I don't know when it ossurs in freecad) you have to adapt your code accordingli, note that exist also a property named InListRecursive , but I haven't tested, I...