Template:APIFunction

From FreeCAD Documentation
{{{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}}
super_rotation(C, D)
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:

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

super_rotation(Vector)

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

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