Std Delete: Difference between revisions

From FreeCAD Documentation
No edit summary
(Undo revision 938559 by Evgeniy (talk))
Tag: Undo
 
(11 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<languages/>
<languages/>
{{UnfinishedDocu{{#translation:}}}}
<translate>
<translate>


<!--T:7-->
<!--T:7-->
{{Docnav
{{Docnav
|[[Std_SelectAll|Std SelectAll]]
|[[Std_SelectAll|SelectAll]]
|[[Std_SendToPythonConsole|Std SendToPythonConsole]]
|[[Std_SendToPythonConsole|SendToPythonConsole]]
|[[Std_Edit_Menu|Std Edit Menu]]
|[[Std_Edit_Menu|Std Edit Menu]]
|IconL=Std_SelectAll.svg
|IconL=Std_SelectAll.svg
Line 16: Line 15:
{{GuiCommand
{{GuiCommand
|Name=Std Delete
|Name=Std Delete
|MenuLocation={{StdMenu|[[Std Edit Menu|Edit]]}} → Delete
|MenuLocation=Edit → Delete
|Workbenches=All
|Workbenches=All
|Shortcut={{KEY|Delete}} or {{KEY|Backspace}}
|Shortcut={{KEY|Del}}
|Version=-
|SeeAlso=[[Std_Undo|Std Undo]], [[Std_Redo|Std Redo]], [[Std_Cut|Std Cut]], [[Std_Paste|Std Paste]]
}}
}}


Line 26: Line 23:


<!--T:4-->
<!--T:4-->
The [[Image:Std_Delete.svg|24px]] [[Std Delete|Delete]] command deletes the selected object(s). If no object is selected, nothing is done.
The '''Std Delete''' command deletes selected objects.


==Usage== <!--T:2-->
==Usage== <!--T:2-->


<!--T:5-->
<!--T:5-->
# Select (an) object(s)
# Select one or more objects.
# There are several ways to invoke the command:
# Invoking the Delete command can be utilized several ways:
#* Select the {{MenuCommand|Edit → [[Image:Std_Delete.svg|16px]] Delete}} option from the menu.
#* Pressing {{KEY|Delete}} or {{KEY|Backspace}} keyboard shortcut
#* Using the {{MenuCommand|{{StdMenu|[[Std Edit Menu|Edit]]}} → Delete}} 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}}.
#* Using the [[tree view|tree view]] context menu.
#* Pressing the [[Image:Std Delete.svg|24px]] button in the toolbar.


<!--T:9-->
==Scripting== <!--T:12-->
'''Note:''' All Delete operations can be {{Button|[[Image:Std Undo.svg|16px]] [[Std Undo|undone]]}} and {{Button|[[Image:Std Redo.svg|16px]] [[Std Redo|redone]]}}.


==Scripting== <!--T:10-->
<!--T:13-->
{{Emphasis|See also:}} [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]].

<!--T:14-->
To delete an object use the {{incode|removeObject}} method of the document object.

</translate>
{{Code|code=
import FreeCAD

FreeCAD.ActiveDocument.removeObject("myObjectName")
}}
<translate>


<!--T:8-->
<!--T:8-->
{{Docnav
{{Docnav
|[[Std_SelectAll|Std SelectAll]]
|[[Std_SelectAll|SelectAll]]
|[[Std_SendToPythonConsole|Std SendToPythonConsole]]
|[[Std_SendToPythonConsole|SendToPythonConsole]]
|[[Std_Edit_Menu|Std Edit Menu]]
|[[Std_Edit_Menu|Std Edit Menu]]
|IconL=Std_SelectAll.svg
|IconL=Std_SelectAll.svg
|IconR=
|IconR=Std_SendToPythonConsole.svg
|IconC=Freecad.svg
|IconC=Freecad.svg
}}
}}


<!--T:6-->
{{Std Base navi}}

<!--T:11-->
{{Userdocnavi}}
</translate>
</translate>
{{Std Base navi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}
{{clear}}
{{clear}}

Latest revision as of 07:22, 11 August 2021

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")