Translations:Scripted objects saving attributes/22/en

From FreeCAD Documentation
Revision as of 08:47, 14 May 2020 by FuzzyBot (talk | contribs) (Importing a new version from external source)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

If the structure of the class changes, that is, if its properties or methods change, are renamed, or are removed, we could test the version attribute in order to migrate the older object to a new set of properties or to a new class. This can be done by implementing the onDocumentRestored method, as explained in Scripted objects migration.