Draft AutoGroup
Draft AutoGroup |
Menu location |
---|
Utilities → AutoGroup |
Workbenches |
Draft, Arch |
Default shortcut |
None |
Introduced in version |
0.17 |
See also |
Std Group |
Description
The AutoGroup tool sets a selected Std Group, or a related element like an Arch Site, an Arch Building or an Arch BuildingPart, as the active auto-group. When an auto-group is set, new objects will be automatically moved to the indicated group upon being created.
Auto-grouping works with elements created with the Draft and Arch Workbenches.
File:Draft AutoGroup example.png
Draft Tray which sets the active auto-group by clicking on the folder icon and choosing a group
Usage
- Select a Std Group, Construction group in the tree view.
- Press the None button, or go to the menu Utilities → AutoGroup. If no group is selected, a drop-down menu will display eligible groups to use, or "None".
- The button will change with the name of the active auto-group, for example, Group.
Notes:
- At least one of Std Group or Construction group must exist before using this tool.
- When auto-grouping is active, new Draft and Arch objects will be placed in that group except when Construction mode is on, in which case the new geometry will be placed in the Construction group.
Scripting
See also: Autogenerated API documentation and FreeCAD Scripting Basics.
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 auto-group, or is None
if no auto-group is active. To change the active auto-group use the setAutoGroup
method of the draftToolBar
object. To put objects in the active auto-group 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()
- Drafting: Line, Polyline, Fillet, Arc, Arc by 3 points, Circle, Ellipse, Rectangle, Polygon, B-spline, Cubic Bézier curve, Bézier curve, Point, Facebinder, ShapeString, Hatch
- Annotation: Text, Dimension, Label, Annotation styles, Annotation scale
- Modification: Move, Rotate, Scale, Mirror, Offset, Trimex, Stretch, Clone, Array, Polar array, Circular array, Path array, Path link array, Point array, Point link array, Edit, Subelement highlight, Join, Split, Upgrade, Downgrade, Wire to B-spline, Draft to sketch, Set slope, Flip dimension, Shape 2D view
- Draft Tray: Select plane, Set style, Toggle construction mode, AutoGroup
- Snapping: Snap lock, Snap endpoint, Snap midpoint, Snap center, Snap angle, Snap intersection, Snap perpendicular, Snap extension, Snap parallel, Snap special, Snap near, Snap ortho, Snap grid, Snap working plane, Snap dimensions, Toggle grid
- Miscellaneous: Apply current style, Layer, Manage layers, Add a new named group, Move to group, Select group, Add to construction group, Toggle normal/wireframe display, Create working plane proxy, Heal, Show snap toolbar
- Additional: Constraining, Pattern, Preferences, Import Export Preferences, DXF/DWG, SVG, OCA, DAT
- Context menu:
- Layer container: Merge layer duplicates, Add new layer
- Layer: Activate this layer, Select layer contents
- Text: Open hyperlinks
- Wire: Flatten
- Working plane proxy: Write camera position, Write objects state
- Getting started
- Installation: Download, Windows, Linux, Mac, Additional components, Docker, AppImage, Ubuntu Snap
- Basics: About FreeCAD, Interface, Mouse navigation, Selection methods, Object name, Preferences, Workbenches, Document structure, Properties, Help FreeCAD, Donate
- Help: Tutorials, Video tutorials
- Workbenches: Std Base, Arch, Assembly, CAM, Draft, FEM, Inspection, Mesh, OpenSCAD, Part, PartDesign, Points, Reverse Engineering, Robot, Sketcher, Spreadsheet, Surface, TechDraw, Test Framework
- Hubs: User hub, Power users hub, Developer hub