Parameters
Understand how parameters work in CalcTree and how they connect across different calculation sources.
Last updated
Understand how parameters work in CalcTree and how they connect across different calculation sources.
Last updated
In CalcTree, parameters are the core building blocks of calculations. Each source—such as a Python script, spreadsheet, or formula—defines its own parameters, which store inputs and results. These parameters can be linked across sources to create dynamic, multi-step calculations.
Sources define the logic and data for a calculation.
Parameters are the named inputs and outputs within a source that carry values, results, or references.
A single CalcTree Page may contain multiple sources, each with its own parameter set.
CalcTree uses Pages to organises calculation works. The CalcTree Page consists of a document and can contain a variety of calculations and data Sources.
Sources define calculation logic and data. Each source defines Parameters that hold calculated values.
Sources: define calculation logic and data
Parameters: hold calculated values and data of a source
CalcTree lets you link parameters across sources, enabling more complex, chained calculations.
There are two types of linking:
Python
Math formulas
Reference another source’s parameter by simply typing its name.
You can link multiple sources to create more complex calculations. That means a source picks up a result from another source and does more calculations on it. In order to link a source to other calculations, it needs to refer to the value of another source's parameters.
Source linking in CalcTree is done in two ways:
Inside editable sources, by typing a parameter name of another source. This works inside Python editor and Math formulas
Via assigning a parameter of another source into an input of one source. This is for sources that aren't editable on the CalcTree page i.e. Spreadsheets and Templates
All parameters defined by all other sources are accessible by typing their names in Python editor or in Math formulas. That means you can simply refer to them by typing those parameter names. The following diagram illustrates this type of linking:
See examples of linking Python or Math formulas to other sources:
To link a Spreadsheet or Template to other sources, you can connect a parameter of those other sources to an input of the spreadsheet or template. The following diagram illustrates this type of linking:
See examples of linking Spreadsheets or Templates to other sources:
To learn more about setting up sources, see: → → → →
Create calculations
Python
Create calculations
Math formulas
Create calculations
Spreadsheets
Create calculations
Templates
a
and b
) by
connecting them to Spreadsheet or Template inputs (x
and y
)