Std DuplicateSelection: Difference between revisions

From FreeCAD Documentation
(Duplicate selection -> Duplicate selected object (as of this date, for 0.19 23756))
No edit summary
Line 41: Line 41:
<!--T:14-->
<!--T:14-->
* Duplicate labels are allowed if {{MenuCommand|Tools → Edit parameters... → BaseApp → Preferences → Document → DuplicateLabels}} is set to {{TRUE}}. This setting can also be changed in the [[Preferences_Editor#Document|Preferences Editor]].
* Duplicate labels are allowed if {{MenuCommand|Tools → Edit parameters... → BaseApp → Preferences → Document → DuplicateLabels}} is set to {{TRUE}}. This setting can also be changed in the [[Preferences_Editor#Document|Preferences Editor]].

==Scripting==

<br>The following '''Std DuplicateSelection''' command can be applied after selecting one or more objects in the [[Tree view]] :

{{Code|code=
FreeCADGui.runCommand('Std_DuplicateSelection')
}}

The selection could be manual (by using the mouse), or via the Python Console.<br>
To know more about selecting objects programmatically, refer to [[Selection_methods]].


<!--T:8-->
<!--T:8-->

Revision as of 03:53, 2 March 2021

Std DuplicateSelection

Menu location
Edit → Duplicate selected object
Workbenches
All
Default shortcut
None
Introduced in version
-
See also
Std Cut, Std Copy, Std Paste

Description

The Std DuplicateSelection command duplicates objects within the active document.

Usage

  1. Select one or more objects.
  2. Select the Edit → Duplicate selected object option from the menu.
  3. If the objects have dependencies that have not been selected, a dialog box will prompt you to specify which should be included.

Notes

  • FreeCAD will automatically change the internal names and, depending on the preferences, labels of objects to avoid name conflicts.

Preferences

  • Duplicate labels are allowed if Tools → Edit parameters... → BaseApp → Preferences → Document → DuplicateLabels is set to true. This setting can also be changed in the Preferences Editor.

Scripting


The following Std DuplicateSelection command can be applied after selecting one or more objects in the Tree view :

FreeCADGui.runCommand('Std_DuplicateSelection')

The selection could be manual (by using the mouse), or via the Python Console.
To know more about selecting objects programmatically, refer to Selection_methods.