Translations:Python scripting tutorial/28/en

When you start FreeCAD, the Python console already loads two base modules: and  (which can also be accessed by their shortcuts  and ). They contain all kinds of generic functionality to work with documents and their objects. To illustrate our concept, see that both and  contain an  attribute, which is the currently opened document. and are not the same object however. They are the two components of a FreeCAD document, and they contain different attributes and methods. For example, contains, which is the currently opened 3D view.