Entwurf Autogruppe

From FreeCAD Documentation
Jump to navigation Jump to search
This page is a translated version of the page Draft AutoGroup and the translation is 44% complete.
Outdated translations are marked like this.
Other languages:
Deutsch • ‎English • ‎español • ‎français • ‎italiano • ‎română • ‎русский

Draft AutoGroup.svg Draft AutoGroup

Menu location
Draft → Utilities → AutoGroup
Draft, Arch
Default shortcut
Introduced in version
See also
Std Group, Entwurf VisGroup


Das Werkzeug "Autogruppe" legt eine ausgewählte Std Gruppe oder ein verwandtes Element wie Entwurf VisGruppe, Archbauwerk, Archbau oder Archbauteil als aktive Autogruppe fest. Wenn eine Autogruppe festgelegt ist, werden neue Objekte beim Erstellen automatisch in die angegebene Gruppe verschoben.

Die automatische Gruppierung funktioniert mit Elementen, die mit der Entwurf und Arch Arbeitsbereiche erstellt wurden.

Draft AutoGroup example.png

Entwurfskassette, die die aktive Autogruppe durch Klicken auf das Ordnersymbol und Auswahl einer Gruppe einstellt


  1. Select a Group.svg Std Group, Group.svg Construction group, or Draft VisGroup.svg Draft VisGroup in the tree view.
  2. Press the Draft AutoGroup off.svg None button, or go to the menu Draft → Utilities → Draft AutoGroup.svg AutoGroup. If no group is selected, a drop-down menu will display eligible groups to use, or "None".
  3. The button will change with the name of the active auto-group, for example, Draft AutoGroup on.svg Group.


  • The Draft AutoGroup.svg AutoGroup button is present in the Draft Tray toolbar, which only appears in the Draft and Arch Workbenches.
  • At least one of Group.svg Std Group, Group.svg Construction group, or Draft VisGroup.svg Draft VisGroup must exist before using this tool.
  • To change the auto-group, select another group in the tree view and click Draft AutoGroup on.svg Group. If no group is selected you have the option of choosing "None" to turn off auto-grouping.
  • When auto-grouping is active, new Draft and Arch objects will be placed in that group except when Draft Construction.svg Construction mode is on, in which case the new geometry will be placed in the Construction group.
  • Auto-grouping only works for objects created from the graphical user interface; objects created programmatically by macros or the Python console aren't automatically placed in groups. The user always has the possibility of programmatically doing the grouping, regardless of the auto-grouping settings.


See also: Draft API and FreeCAD Scripting Basics.

Adding objects to the active auto-group can be done in macros and from the Python console by using the following function:

  • Puts the obj element in the current auto-group.
  • If auto-grouping is disabled (the group is None), or if Construction mode is active, or if obj is already in the auto-group, the function doesn't do anything.
  • The function will fail if obj is already in another group that is different from the auto-group.
  • The function only does something if the graphical interface is active, as the auto-group can only be chosen from the graphical interface.


import FreeCAD, Draft

Polygon1 = Draft.makePolygon(3, 500)
Polygon2 = Draft.makePolygon(3, 1000)
Polygon3 = Draft.makePolygon(5, 1500)

FreeCAD.ActiveDocument.addObject("App::DocumentObjectGroup", "Group") 

# Use the graphical interface to set "Group" for auto-grouping