FreeCADGui API: Difference between revisions
({{Code|code=) |
Wandererfan (talk | contribs) No edit summary |
||
Line 4: | Line 4: | ||
</translate> |
</translate> |
||
{{Code|code= |
{{Code|code= |
||
import |
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") |
|||
}} |
}} |
||
Revision as of 11:45, 19 March 2018
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")
Description: Adds a FreeCAD command. String is the name of the command and object is a classname defining the command
Returns:
Description: Adds an icon as file name or in XPM format to the system
Returns:
Description: Adds a UI form to the preferences dialog. The first argument specifies the file name and the second specifies the group name
Returns:
Description: Adds a workbench under a defined name. The string is the workbench name and the object is a classname defining the workbench
Returns: