Draft AutoGroup/de: Difference between revisions

From FreeCAD Documentation
No edit summary
No edit summary
Line 10: Line 10:
}}
}}


{{GuiCommand/de
<div class="mw-translate-fuzzy">
{{GuiCommand
|Name=Draft AutoGroup
|Name=Draft AutoGroup
|MenuLocation=Draft → Utilities → AutoGroup
|Name/de=Draft AutoGroup
|Empty=1
|Workbenches=[[Draft Workbench|Draft]], [[Arch Workbench|Arch]]
|SeeAlso=[[Draft_Layer|Draft Layer]], [[Std Group|Std Group]]
|Workbenches=[[Draft_Workbench/de|Draft]], [[Arch_Workbench/de|Arch]]
|Version=0.17
|Version=0.17
|SeeAlso=[[Draft_Layer/de|Draft Layer]], [[Std_Group/de|Std Gruppe]]
}}
}}
</div>


<span id="Description"></span>
<span id="Description"></span>

Revision as of 12:25, 22 December 2023

Draft AutoGroup

Menüeintrag
Keiner
Arbeitsbereich
Draft, Arch
Standardtastenkürzel
Keiner
Eingeführt in Version
0.17
Siehe auch
Draft Layer, Std Gruppe

Beschreibung

The Draft AutoGroup command changes the active Draft Layer or, optionally, the active Std Group or group-like Arch object. New Draft and Arch objects are automatically placed in this active layer or group.

This command was originally intended for groups, hence its name, but was redesigned in FreeCAD version 0.19 when a layer system was introduced. Because handling layers is now the default for the command the rest of this page will primarily focus on layers.

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

Anwendung

  1. Optionally select the layer you want to make active in the Tree view.
  2. There are several ways to invoke the command:
    • Press the button in the Draft Tray. This button can look different. If there is an active layer it will show the name of the layer and a layer icon with the AnsichtLine Color and AnsichtShape Color of the layer.
    • If you have selected a layer: select the Activate this layer option from the Tree view context menu.
  3. If you have not yet selected a layer the layer menu opens. Do one of the following:
    • Select None to work without an active layer.
    • Select an existing layer to make active.
    • Select Add new Layer to create a new layer. Selecting this option will not change the active layer.
  4. If the active layer was changed the button in the Draft Tray is updated.

Notes

  • A new layer can also be created by right-clicking the layer container in the Tree view and selecting the Add new layer option from the context menu.
  • If Draft construction mode is switched on the active layer is ignored.

Preferences

See also: Preferences Editor and Draft Preferences.

  • This command can optionally also handle groups: Edit → Preferences... → Draft → General → Include groups in layer list.

Skripten

If the Draft Workbench is active the FreeCADGui application object has a draftToolBar property. This draftToolBar object has an autogroup property, which contains the name of the active autogroup, or is None if no autogroup is active. To change the active autogroup use the setAutoGroup method of the draftToolBar object. To put objects in the active autogroup use the autogroup method of the Draft module.

# This code only works if the Draft Workbench is active!

import FreeCAD as App
import FreeCADGui as Gui
import Draft

doc = App.newDocument()

polygon1 = Draft.make_polygon(5, radius=1000)
polygon2 = Draft.make_polygon(3, radius=500)
polygon3 = Draft.make_polygon(6, radius=220)

layer = Draft.make_layer()
Gui.draftToolBar.setAutoGroup(layer.Name)

Draft.autogroup(polygon1)
Draft.autogroup(polygon2)
Draft.autogroup(polygon3)

doc.recompute()