GuiCommand model: Difference between revisions
(Reworked model) |
Renatorivo (talk | contribs) (Marked this version for translation) |
||
Line 1: | Line 1: | ||
<languages/> |
<languages/> |
||
<translate> |
<translate> |
||
<!--T:15--> |
|||
{{Message|This page shows a model of a recommended GuiCommand page. Under the [[#Selectable block|Selectable block]] section below you will find the same content easily selectable for pasting in a new page.}} |
{{Message|This page shows a model of a recommended GuiCommand page. Under the [[#Selectable block|Selectable block]] section below you will find the same content easily selectable for pasting in a new page.}} |
||
Line 19: | Line 20: | ||
Insert here a short description of what the command does. |
Insert here a short description of what the command does. |
||
<!--T:16--> |
|||
Add an image if possible, and please follow the guidelines in [[WikiPages#Graphics]]. Example taken from Draft Line: |
Add an image if possible, and please follow the guidelines in [[WikiPages#Graphics]]. Example taken from Draft Line: |
||
</translate> |
</translate> |
||
[[File:Draft_Line_example.jpg|none|400px]] |
[[File:Draft_Line_example.jpg|none|400px]] |
||
<translate> |
<translate> |
||
<!--T:17--> |
|||
''Optional: add a caption in italics below the image.'' |
''Optional: add a caption in italics below the image.'' |
||
Line 34: | Line 37: | ||
==Options== <!--T:5--> |
==Options== <!--T:5--> |
||
<!--T:18--> |
|||
* List the command options here. Check out two examples, [[Draft Line]] and [[PartDesign Pad]]. |
* List the command options here. Check out two examples, [[Draft Line]] and [[PartDesign Pad]]. |
||
==Properties== <!--T:6--> |
==Properties== <!--T:6--> |
||
===Data=== |
===Data=== <!--T:19--> |
||
<!--T:20--> |
|||
* {{PropertyData|PropertyName1}}: Description of the property |
* {{PropertyData|PropertyName1}}: Description of the property |
||
===View=== |
===View=== <!--T:21--> |
||
<!--T:22--> |
|||
* {{PropertyView|PropertyName2}}: Description of the property |
* {{PropertyView|PropertyName2}}: Description of the property |
||
Line 67: | Line 73: | ||
<translate> |
<translate> |
||
==Limitations== |
==Limitations== <!--T:23--> |
||
* Optional, use bullet list if multiple items |
* Optional, use bullet list if multiple items |
||
Revision as of 09:20, 24 November 2018
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