Std Delete/en: Difference between revisions

From FreeCAD Documentation
(Updating to match new version of source page)
(Updating to match new version of source page)
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
<languages/>
<languages/>


{{Docnav
{{GuiCommand|Name=Std Delete|Workbenches=All|MenuLocation=[[Std Edit Menu|Edit]] → Delete}}
|[[Std_SelectAll|SelectAll]]
|[[Std_SendToPythonConsole|SendToPythonConsole]]
|[[Std_Edit_Menu|Std Edit Menu]]
|IconL=Std_SelectAll.svg
|IconR=Std_SendToPythonConsole.svg
|IconC=Freecad.svg
}}


{{GuiCommand
This command deletes the selected object(s). If no object is selected, nothing is done.
|Name=Std Delete
|MenuLocation=Edit → Delete
|Workbenches=All
|Shortcut={{KEY|Del}}
}}


==Description==
Selected object(s) can be deleted from the document by pressing {{KEY|DEL}}, from the menu item Edit → Delete, or from the Tree View context menu. All Delete operations can be undone and redone.


The '''Std Delete''' command deletes selected objects.

==Usage==

# Select one or more objects.
# There are several ways to invoke the command:
#* Select the {{MenuCommand|Edit → [[Image:Std_Delete.svg|16px]] Delete}} option from the menu.
#* Select the {{MenuCommand|[[Image:Std_Delete.svg|16px]] Delete}} option from the [[Tree_view|Tree view]] context menu or [[3D_view|3D view]] context menu.
#* Use the keyboard shortcut: {{KEY|Del}}.

==Scripting==

{{Emphasis|See also:}} [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]].

To delete an object use the {{incode|removeObject}} method of the document object.

{{Code|code=
import FreeCAD

FreeCAD.ActiveDocument.removeObject("myObjectName")
}}

{{Docnav
|[[Std_SelectAll|SelectAll]]
|[[Std_SendToPythonConsole|SendToPythonConsole]]
|[[Std_Edit_Menu|Std Edit Menu]]
|IconL=Std_SelectAll.svg
|IconR=Std_SendToPythonConsole.svg
|IconC=Freecad.svg
}}

{{Std Base navi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}
{{clear}}
{{clear}}

Latest revision as of 09:20, 29 December 2020

Std Delete

Menu location
Edit → Delete
Workbenches
All
Default shortcut
Del
Introduced in version
-
See also
None

Description

The Std Delete command deletes selected objects.

Usage

  1. Select one or more objects.
  2. There are several ways to invoke the command:
    • Select the Edit → Delete option from the menu.
    • Select the Delete option from the Tree view context menu or 3D view context menu.
    • Use the keyboard shortcut: Del.

Scripting

See also: FreeCAD Scripting Basics.

To delete an object use the removeObject method of the document object.

import FreeCAD

FreeCAD.ActiveDocument.removeObject("myObjectName")