Template:Macro: Difference between revisions
No edit summary |
No edit summary |
||
Line 19: | Line 19: | ||
|}}{{#if:{{{Date|}}} | |}}{{#if:{{{Date|}}} | ||
|Last modified: {{{Date}}}<br/> | |Last modified: {{{Date}}}<br/> | ||
|}}{{#if:{{{ | |}}{{#if:{{{FCVersion|}}} | ||
| | |FreeCAD version: {{{FCVersion}}}<br/> | ||
|}}{{#if:{{{Download|}}} | |}}{{#if:{{{Download|}}} | ||
|Download: {{{Download}}}<br/> | |Download: {{{Download}}}<br/> | ||
Line 48: | Line 48: | ||
| class="ctEven macro-date"|{{{Date|''None''}}} | | class="ctEven macro-date"|{{{Date|''None''}}} | ||
|- | |- | ||
! class="ctOdd"| | ! class="ctOdd"|FreeCAD Version(s) | ||
|- | |- | ||
| class="ctEven | | class="ctEven FreeCAD-version"|{{{FCVersion|''None''}}} | ||
|- | |- | ||
! class="ctOdd"|Default shortcut | ! class="ctOdd"|Default shortcut | ||
Line 65: | Line 65: | ||
|- | |- | ||
|} | |} | ||
[[Category:Macros{{#translation:}}]] | |||
[[Category:User Documentation{{#translation:}}]]<noinclude> | |||
{{VeryImportantMessage|Wiki Page Authors and Translators: This template auto-inserts <nowiki>[[Category:Macros{{#translation}}]]</nowiki> and <nowiki>[[Category:User Documentation{{#translation:}}]]</nowiki>. If you are a '''Wiki Page Author''' please do not add any redundant categories, it can potentially confuse translators and clutters up the Category lists. If you decide to add categories to your post please add them '''outside''' of translation tags. }} | |||
==Usage== | ==Usage== | ||
This template is the main tool to document [[macros|macros]]. It should be inserted as the first line in documentation pages. | This template is the main tool to document [[macros|macros]]. It should be inserted as the first line in documentation pages, after the <code><languages/></code> and <code><translate></code> tags. | ||
See a sample to the right. | See a sample to the right. | ||
{{Macro | {{Macro | ||
|Name=SomeMacro | |Name=SomeMacro | ||
|Description=This macro | |Description=This macro improves the solid shapes in all ways. | ||
|Author=WikiUserName | |Author=WikiUserName | ||
|Version=2.0 | |Version=2.0 | ||
|Date= | |Date=2018-11-20 | ||
}} | }} | ||
<nowiki>{{Macro | <nowiki>{{Macro | ||
|Name=SomeMacro | |Name=SomeMacro | ||
|Description=This macro | |Description=This macro improves the solid shapes in all ways. | ||
|Author=WikiUserName | |Author=WikiUserName | ||
|Download=[https:// | |Download=[https://www.freecadweb.org/wiki/images/2/2c/Text-x-python.png Text-x-python.png] | ||
|Version=2.0 | |Version=2.0 | ||
|Date= | |Date=2018-11-20 | ||
}}</nowiki> | }}</nowiki> | ||
Line 89: | Line 92: | ||
<nowiki>{{Macro | <nowiki>{{Macro | ||
|Name=SomeMacro | |Name=SomeMacro | ||
|Description=This macro | |Description=This macro improves the solid shapes in all ways. | ||
|Author=WikiUserName | |Author=WikiUserName | ||
|Download=Possible files to download, example the icon toolBar ... | |Download=Possible files to download, example the icon toolBar ... | ||
|Date= | |Date=2018-11-20 | ||
|Version=2.0 | |Version=2.0 | ||
| | |FCVersion= 0.16 to 0.19 | ||
}}</nowiki> | }}</nowiki> | ||
Line 118: | Line 121: | ||
: A description for the macro, this description will be displayed in Addon manager. | : A description for the macro, this description will be displayed in Addon manager. | ||
;Author | ;Author | ||
: The author of the macro. This name is linked to the user's page in the wiki, that is, [[User:Author]]. Since macros are not part of the official | : The author of the macro. This name is linked to the user's page in the wiki, that is, [[User:Author]]. Since macros are not part of the official FreeCAD code, users should direct their questions about them to their particular creators. The author of a macro should be reachable in the [https://forum.freecadweb.org/ forum], with the same username as in the wiki. | ||
;Download | ;Download | ||
: Possible files to download, example the icon toolBar and other file. Give the complete link of the object ex: {{Incode|<nowiki>Download=[https:// | : Possible files to download, example the icon toolBar and other file. Give the complete link of the object ex: {{Incode|<nowiki>Download=[https://www.freecadweb.org/wiki/images/2/2c/Text-x-python.png Text-x-python.png]</nowiki>}} | ||
;Date | ;Date | ||
: All macros must have a date. This is helpful to indicate the last time the macro was modified, and warn the user of the age of the code. Macros that are very old may be obsolete and may not work with a recent version of | : All macros must have a date. This is helpful to indicate the last time the macro was modified, and warn the user of the age of the code. Macros that are very old may be obsolete and may not work with a recent version of FreeCAD. | ||
; | ;FCVersion | ||
: | : FreeCAD version(s) to run the macro example: <code><nowiki>FCVersion=0.16 to 0.19</nowiki></code> | ||
===Optional Parameters=== | ===Optional Parameters=== | ||
The following parameters are optional. If they are not included in the template, they will display a default value. | The following parameters are optional. If they are not included in the template, they will display a default value. | ||
;Translate | |||
: The name translated in your language which will be displayed in the window title. For example <code>Translate=Some_translated_name</code> | |||
;Links | ;Links | ||
: Other help link for the macro example Video, Tutorials page related on the macro. | : Other help link for the macro example Video, Tutorials page related on the macro. |
Revision as of 07:12, 16 April 2024
Description |
---|
{{{Description}}} |
Author |
[[User:{{{Author}}}|{{{Author}}}]] |
Download |
None |
Links |
Macros recipes How to install macros How to customize toolbars |
Macro Version |
1.0 |
Date last modified |
None |
FreeCAD Version(s) |
None |
Default shortcut |
None |
See also |
None |
[[Category:Macros{{#translation:}}]] [[Category:User Documentation{{#translation:}}]]
Usage
This template is the main tool to document macros. It should be inserted as the first line in documentation pages, after the <languages/>
and <translate>
tags.
See a sample to the right.
Description |
---|
This macro improves the solid shapes in all ways. Macro version: 2.0 Last modified: 2018-11-20 Author: WikiUserName |
Author |
WikiUserName |
Download |
None |
Links |
Macros recipes How to install macros How to customize toolbars |
Macro Version |
2.0 |
Date last modified |
2018-11-20 |
FreeCAD Version(s) |
None |
Default shortcut |
None |
See also |
None |
[[Category:Macros{{#translation:}}]] [[Category:User Documentation{{#translation:}}]]
{{Macro |Name=SomeMacro |Description=This macro improves the solid shapes in all ways. |Author=WikiUserName |Download=[https://www.freecadweb.org/wiki/images/2/2c/Text-x-python.png Text-x-python.png] |Version=2.0 |Date=2018-11-20 }}
The required parameters are:
{{Macro |Name=SomeMacro |Description=This macro improves the solid shapes in all ways. |Author=WikiUserName |Download=Possible files to download, example the icon toolBar ... |Date=2018-11-20 |Version=2.0 |FCVersion= 0.16 to 0.19 }}
Other parameters may be omitted or their value left empty.
Required parameters
Parameters are specified with its value after the equals sign, parameter=value
.
Each parameter in the list is separated by a pipe symbol |
.
|... |Name=SomeMacro|Author=WikiUserName| ...
Parameters can be placed in the same line, or each in a separate line.
|... |Name=SomeMacro |Author=WikiUserName | ...
The following parameters are required.
- Name
- The properly capitalized name of the macro to be documented.
- The name is used to retrieve the icon graphic
Name.svg
orName.png
from the wiki repository. The template works properly if the icon does not exist; in this case, a generic icon is displayed. - Description
- A description for the macro, this description will be displayed in Addon manager.
- Author
- The author of the macro. This name is linked to the user's page in the wiki, that is, User:Author. Since macros are not part of the official FreeCAD code, users should direct their questions about them to their particular creators. The author of a macro should be reachable in the forum, with the same username as in the wiki.
- Download
- Possible files to download, example the icon toolBar and other file. Give the complete link of the object ex:
Download=[https://www.freecadweb.org/wiki/images/2/2c/Text-x-python.png Text-x-python.png]
- Date
- All macros must have a date. This is helpful to indicate the last time the macro was modified, and warn the user of the age of the code. Macros that are very old may be obsolete and may not work with a recent version of FreeCAD.
- FCVersion
- FreeCAD version(s) to run the macro example:
FCVersion=0.16 to 0.19
Optional Parameters
The following parameters are optional. If they are not included in the template, they will display a default value.
- Translate
- The name translated in your language which will be displayed in the window title. For example
Translate=Some_translated_name
- Links
- Other help link for the macro example Video, Tutorials page related on the macro.
- Version
- The version of the macro. If no value is given, it will default to
1.0
. This is helpful for authors, so that they can document particular versions of their own macros. - Shortcut
- Some macros may introduce shortcuts to launch specific tools. Indicate the shortcut buttons to press with this value. If no value is given, it will default to None.
- SeeAlso
- Optional links to other related commands, for example,
SeeAlso=[[Some Tool|Tool]]
. - Icon
- An image file different from
Name.svg
orName.png
to use as icon. This can be used to include a specific icon that is not named after the command, for example,Icon=Some_other_name.svg