Std Delete: Difference between revisions

From FreeCAD Documentation
m (1 revision)
(Undo revision 938559 by Evgeniy (talk))
Tag: Undo
 
(39 intermediate revisions by 9 users not shown)
Line 1: Line 1:
<languages/>
{{GuiCommand|Name=Std_Delete|Workbenches=All|SeeAlso=...}}
<translate>
'''Synopsis'''
ToDo.


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


<!--T:1-->
{{Template:UnfinishedDocu}}
{{GuiCommand
|Name=Std Delete
|MenuLocation=Edit → Delete
|Workbenches=All
|Shortcut={{KEY|Del}}
}}

==Description== <!--T:3-->

<!--T:4-->
The '''Std Delete''' command deletes selected objects.

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

<!--T:5-->
# 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== <!--T:12-->

<!--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-->
{{Docnav
|[[Std_SelectAll|SelectAll]]
|[[Std_SendToPythonConsole|SendToPythonConsole]]
|[[Std_Edit_Menu|Std Edit Menu]]
|IconL=Std_SelectAll.svg
|IconR=Std_SendToPythonConsole.svg
|IconC=Freecad.svg
}}

</translate>
{{Std Base navi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}
{{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")