Add a function
A function is an argument that is not exposed to external access. The value of a function is generated by user-defined logic created in the
Library Designer
and by conditions that apply during instantiation. To add a function
- In the decorator panel, either:
- Click
on the Functiontab toolbar. - In theFunctiontab, right-click a group name and then clickAdd new Function.The Function Builder window opens.TIP:The fields displayed in theFunction Builderare dynamic depending on the type of function selected.
- Enter the values for the new function.
- InType, either:
- ChooseCalculation, then specify anExpressionto evaluate to generate the output value.
- ChooseConditional, then specify a logical condition to evaluate usingIf/Elselogic to generate the output value. Expressions can be used as part of the logical statement for both evaluated conditions and output values.
- InResult Type, choose the data type of the functions output.
- InFunction Scope, choose the library object that contains the function.
- To base the new function on an existing function, clickImportand then select the function.TIP:Click the ellipsis (...) button next to a field that supports expressions to use the Expression Builder to create the expression.
- (optional) ClickSaveto save the function as an XML file for reuse purposes.
- ClickOKto add the new function.
Provide Feedback