Template:APIFunction

From FreeCAD Documentation
Jump to navigation Jump to search
Method.png {{{1}}}({{{2}}})

Description: {{{3}}}

Returns: {{{4}}}


This template is like Template:APIFunction_b but includes a third argument to include a description of the function, and a fourth argument to include the return value.

Usage:

{{APIFunction_b|function name|arguments with defaults}}
{{APIFunction  |function name|arguments with defaults|long description|return value}}

Example:

{{APIFunction_b|super_rotation|C, D}}
{{APIFunction  |super_rotation|Vector|uses the points ''C'' and ''D'', or a ''Vector''|new ''Vector'' with the new rotation}}
Method.png super_rotation(C, D)
Method.png super_rotation(Vector)

Description: uses the points C and D, or a Vector

Returns: new Vector with the new rotation


Note:

If you must include special characters in the template example pipe " | " Curly brackets or braces " }} " or other non accepted characters,

Example:

{{APIFunction  |super_rotation|Vector|uses the pipe '' | '' and '' ( ) '' and '' { } ''|new ''Vector'' with ''" }} "'' the new rotation}}

Return wrong report:

Method.png super_rotation(Vector)

Description: uses the pipe "

Returns: new "Vector" with "

" the new rotation


use the nowiki code : <nowiki> "| >= 0" </nowiki>

{{APIFunction  |super_rotation|Vector|uses the pipe " <nowiki>|</nowiki> " and " <nowiki> >=0 </nowiki> " and " <nowiki>{ }</nowiki> "|new "Vector" with " <nowiki>}}</nowiki> " the new rotation}}

Good report lets'go

Method.png super_rotation(Vector)

Description: uses the pipe " | " and " >=0 " and " { } "

Returns: new "Vector" with " }} " the new rotation