Skip to content

commands

freecad.datamanager_wb.entrypoints.commands

FreeCAD command registrations for the DataManager workbench.

This module defines the toolbar/menu commands and connects them to the workbench's main panel.

GetMainPanel = Callable[[], 'MainPanel'] module-attribute

register_commands(get_main_panel)

Register the DataManager commands with FreeCAD.

Parameters:

Name Type Description Default
get_main_panel GetMainPanel

Factory used by command activation to show/reuse a singleton MainPanel.

required
Source code in freecad/datamanager_wb/entrypoints/commands.py
def register_commands(get_main_panel: GetMainPanel) -> None:
    """Register the DataManager commands with FreeCAD.

    Args:
        get_main_panel: Factory used by command activation to show/reuse a
            singleton MainPanel.
    """
    import FreeCADGui as Gui  # pylint: disable=import-error

    Gui.addCommand("DataManagerVarsetManagement", _VarsetManagementCommand(get_main_panel))
    Gui.addCommand("DataManagerAliasManagement", _AliasManagementCommand(get_main_panel))