GuiCommand model
This page shows a model of a recommended GuiCommand page. Under the Selectable block section below you will find the same content easily selectable for pasting in a new page.
Base ExampleCommandModel |
Menu location |
---|
Menu → Submenu → Command |
Workbenches |
Workbench |
Default shortcut |
None |
Introduced in version |
0.17 |
See also |
None |
Description
Insert here a short description of what the command does.
Add an image if possible, and please follow the guidelines in WikiPages#Graphics. Example taken from Draft Line:
Optional: add a caption in italics below the image.
How to use
- Press the File:Std Close.png Command name button.
- Detailed steps as needed.
- Set options and press OK.
Options
- List the command options here. Check out two examples, Draft Line and PartDesign Pad.
Properties
Data
- DataPropertyName1: Description of the property
View
- ViewPropertyName2: Description of the property
Example
Optional
Scripting
The ExampleCommandModel tool can be used in macros and from the python console by using the following function:
makeExampleCommandModel(Data, Data)
- Creates a CommandModel using Data.
- Returns the newly created object.
Example:
import FreeCAD, Base Base.makeExampleCommandModel(FreeCAD.Data,FreeCAD.Data)
Limitations
- Optional, use bullet list if multiple items
Other
Optional
Selectable block
{{GuiCommand |Name=Base ExampleCommandModel |Icon=<!--filename of icon with extension (e.g. svg, png) if not the same name as command / delete row if unused--> |MenuLocation=Menu → Submenu → Command |Workbenches=[[Workbench Name|Workbench]] |Shortcut=<!--delete this row if not used--> |SeeAlso=<!--add links to similar commands, delete this row if not used--> |Version=0.17 }} ==Description== Insert here a short description of what the command does. </translate> [[File:Draft_Line_example.jpg|none|400px]] <translate> ''Optional: add a caption in italics.'' ==How to use== # Press the {{KEY|[[File:Std Close.png|24px]] '''Command name'''}} button. # Detailed steps as needed. # Set options and press {{KEY|OK}}. ==Options== * List the command options here. ==Properties== ===Data=== * {{PropertyData|PropertyName1}}: Description of the property ===View=== * {{PropertyView|PropertyName2}}: Description of the property ==Example== Optional ==Scripting== The ExampleCommandModel tool can be used in [[macros]] and from the python console by using the following function: </translate> '''makeExampleCommandModel(Data, Data)''' <translate> * Creates a CommandModel using Data. * Returns the newly created object. Example: </translate> import FreeCAD, Base Base.makeExampleCommandModel(FreeCAD.Data,FreeCAD.Data) <translate> ==Limitations== * Optional, use bullet list if multiple items ==Other== Optional