Std Delete: Difference between revisions

From FreeCAD Documentation
No edit summary
No edit summary
Line 36: Line 36:
#* 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.
#* 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}}.
#* 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.

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

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


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

Revision as of 18:36, 21 March 2020

This documentation is a work in progress. Please don't mark it as translatable since it will change in the next hours and days.


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