Std UserEditMode: Difference between revisions

From FreeCAD Documentation
(Translation tags.)
Line 62: Line 62:
{{Code|code=
{{Code|code=
import FreeCADGui
import FreeCADGui
FreeCADGui.setUserEditMode(MODENAME) # With MODENAME a string available in list of modes
FreeCADGui.setUserEditMode(MODENAME) # Where MODENAME is a string available in the list of edit modes
}}
}}
<translate>
<translate>

Revision as of 19:51, 2 September 2021

Other languages:

Std UserEditMode

Menu location
Edit → Edit mode
Workbenches
All
Default shortcut
None
Introduced in version
0.20
See also
Std Edit

Description

The Std UserEditMode command defines the edit mode to be used when an object is double-clicked in the Tree view.

Usage

Choose an edit mode among available ones:

  1. File:EditModeDefault.svg Default: the object will be edited with its default mode. The edit mode is defined internally to be the most appropriate according the object type: for example, it will be shape properties edition for Part primitives and PartDesign features, placement edition with transform tool for boolean operations, ...
  2. File:EditModeTransform.svg Transform: the object will have its placement editable with the Transform manipulator
  3. File:EditModeCutting.svg Cutting: ??? this mode is implemented as available but seems to be currently not used by any object in FreeCAD
  4. File:EditModeColor.svg Color: the object will have its individual faces color editable with the face color editor

Notes

  • Not all objects support all edit modes. In case the selected edit mode isn't supported by the edited object, it will fall back to its default mode

Scripting

See also: FreeCAD Scripting Basics.

To list the available edit modes:

import FreeCADGui
FreeCADGui.listUserEditModes()

To get the active edit mode:

import FreeCADGui
FreeCADGui.getUserEditMode()

To set the active edit mode:

import FreeCADGui
FreeCADGui.setUserEditMode(MODENAME) # Where MODENAME is a string available in the list of edit modes