Template:GuiCommand
{{{Name}}} |
Menu location |
---|
None |
Workbenches |
{{{Workbenches}}} |
Default shortcut |
None |
Introduced in version |
- |
See also |
None |
Usage
This template is the main tool to document GuiCommands. It should be inserted in documentation pages right after the <languages/>
and <translate>
tags.
See the sample on the right.
|
Menu location |
---|
Menu → Command |
Workbenches |
Wb1, Wb2 |
Default shortcut |
DefaultShortcut |
Introduced in version |
0.7 |
See also |
OtherTopic |
{{GuiCommand |Name=SampleCommand |MenuLocation=Menu → Command |Workbenches=Wb1, Wb2 |Shortcut=DefaultShortcut |Version=0.7 |SeeAlso=OtherTopic }}
Parameters are specified with values after the equals sign: parameter=value
.
The required parameters are:
{{GuiCommand |Name=SampleCommand |Workbenches=Wb1, Wb2 }}
Other parameters may be omitted or their value left empty.
Required parameters
The following parameters are required.
- Name
- The properly capitalized name of the command to be documented.
- The name is used to retrieve the icon graphic
Name.svg
orName.png
from the wiki repository. - Workbenches
- One or more workbenches in FreeCAD that the command and icon can be found in. It should be an internal link to the workbench page, used like this:
[[Part Workbench|Part]]
The portion to the left of the pipe |
is the page name, and the portion to the right is the displayed text. This example will display as Part.
Optional Parameters
The following parameters are optional. If they are not included in the template, they will default to None, or a dash (-).
- MenuLocation
- The location of the command in the FreeCAD menu structure. Please use the proper right arrow symbol (→) rather than ->.
- Shortcut
- The default keyboard shortcut to launch the command in FreeCAD, for example,
Shortcut={{KEY|A}} {{KEY|B}}
. - Version
- The FreeCAD version number in which the command was first introduced, for example,
Version=0.17
. There is no need to add the specific revision number, only the major version. Use this parameter for all new commands included in the documentation. - SeeAlso
- Optional links to other related commands and Wiki pages, for example,
SeeAlso=[[Some Tool|Tool]]
. - Icon
- An image file different from
Name.svg
orName.png
for the icon. This can be used to include a specific icon that is not named after the command, for example,Icon=Some_other_name.svg
- Empty
- If
Empty=1
no icon is displayed. This is for the rare cases where theName.svg
orName.png
icon needs to be suppressed.
Localization
The code required for this template is different if you are using a localized version. For more information see the Localization page.
First, a localized version of this template must exist or be created.
The localized template must be named:
Template:GuiCommand/AA
where /AA
is the letter code for the desired language, for example /fr
indicates French. These are the ISO 639-1 language codes, and not country codes.
The method for calling the localized GuiCommand template is:
{{GuiCommand/AA |Name=SampleCommand |Name/AA=SampleCommand (translated) |MenuLocation=Menu → Commande... |Workbenches=Wb1, Wb2 |Shortcut=DefaultShortcut |SeeAlso=OtherTopic |Version=0.7 }}
In the example above the Name
parameter is critical. Name=SampleCommand
allows the correct icon file to be displayed; Name/AA=SampleCommand (translated)
displays the correct localized version of the command documentation.
GuiCommand model
For a complete example of how to document a GuiCommand, see GuiCommand model.