FreeCADGui API/de

From FreeCAD Documentation
Jump to navigation Jump to search
This page is a translated version of the page FreeCADGui API and the translation is 0% complete.
Outdated translations are marked like this.
Other languages:
Deutsch • ‎English • ‎español • ‎français • ‎italiano • ‎română
(November 2018) Diese Information kann unvollständig und veraltet sein. Für die letzte API siehe die (engl.) autogenerierte API-Dokumentation.

This module is the counterpart of the FreeCAD module. It contains everything related to the User interface and the 3D views. Example:

import FreeCAD as App
import FreeCADGui as Gui

# get the 3D model document
doc = App.ActiveDocument    

# get the visual representation model document
gui_doc = Gui.ActiveDocument

gui_doc.activateWorkbench("myWorkbench")


Method.png activateWorkbench(string)

Description: Activates a workbench by name

Returns: nothing

Method.png activeDocument( )

Description:

Returns: the active document or None if no one exists

Method.png activeWorkbench( )

Description:

Returns: the active workbench object

Method.png addCommand(string, object)

Description: Adds a FreeCAD command. String is the name of the command and object is a classname defining the command

Returns:

Method.png addIcon(string, string or list)

Description: Adds an icon as file name or in XPM format to the system

Returns:

Method.png addIconPath(string)

Description: Add a new path to the system where to find icon files

Returns:

Method.png addPreferencePage(string,string)

Description: Adds a UI form to the preferences dialog. The first argument specifies the file name and the second specifies the group name

Returns:

Method.png addWorkbench(string, object)

Description: Adds a workbench under a defined name. The string is the workbench name and the object is a classname defining the workbench

Returns:

Method.png createDialog(string)

Description: Opens a UI file

Returns:

Method.png getDocument(string)

Description: Gets a document by its name

Returns: the document

Method.png getWorkbench(string)

Description: Gets a workbench by its name

Returns: the workbench

Method.png insert(string)

Description: Open a macro, Inventor or VRML file

Returns: the document

Method.png listWorkbenches( )

Description: Shows a list of all workbenches

Returns: a list

Method.png open(string)

Description: Opens a macro, Inventor or VRML file

Returns: the openend document

Method.png removeWorkbench(string)

Description: Removes a workbench by name

Returns:

Method.png runCommand(string)

Description: Runs a FreeCAD command by name

Returns:

Method.png updateGui( )

Description: Updates the main window and all its windows

Returns: