G-G
March 5, 2025, 2:07pm
1
Hi folks,
While updating Dynamo training materials, I found references to a “Formula” node, which I cannot find in the latest Dynamo version. So that node has been removed… I guess? Does anyone know for sure?
Thanks,
GG
I believe this happened as a result of the migration to .NET8. The advice is to use formulae in a codeblock node:
return remainder;
}
/// <summary>
/// Evaluates an NCalc formula with given parameter mappings.
/// </summary>
/// <param name="formulaString">NCalc formula</param>
/// <param name="parameters">Variable names</param>
/// <param name="arguments">Variable bindings</param>
/// <returns name="result">type: var[]..[] (result of the formula calculation)</returns>
[Obsolete("EvaluateFormula has been deprecated in Dynamo 3.0. If using this node in a graph, please write the corresponding DesignScript code for the formula to execute it in a Code Block node.")]
public static object EvaluateFormula(string formulaString, string[] parameters, object[] arguments)
{
return null;
}
/// <summary>
/// Returns the exponential of the number, the constant e raised to the value number.
/// </summary>
/// <param name="number">Number.</param>
/// <returns name="double">The exponential of the number.</returns>
But any leftover formula nodes in your existing graphs should be auto-migrated:
master
← aparajit-pratap:dyn-6018
opened 03:47PM - 25 Jul 23 UTC
### Purpose
~~Attempt at migrating formula node deserialization to code block… nodes.~~
~~The regex expressions used so far do not support arbitrarily nested expressions just yet, for example, expressions like
`if(sin(90+10) > log10(100), 45, tan(90))`, are not translated properly into DS for CBNs.~~
Auto-migration of Formula node to Codeblock node during workspace deserialization. In cases where the auto-conversion, fails, the unchanged formula code is copied to a CBN with an appropriate warning. Even in cases where there is a successful conversion to a codeblock node, a warning is issued on the converted node indicating that it has been created by migrating to a Formula node.
This PR removes the dependency on ncalc and deprecates both Formula `nodemodel` node as well as `EvaluateFormula` ZT node.
TODO:
- ~~Unit tests to test migration~~
- ~~Cleanup (Formula.cs file needs to be deleted, not just removed)~~
- ~~One test has been commented out, it needs to be updated~~
- Fix any test failures in build job
Failed migration case:

### Declarations
Check these if you believe they are true
- [ ] The codebase is in a better state after this PR
- [ ] Is documented according to the [standards](https://github.com/DynamoDS/Dynamo/wiki/Coding-Standards)
- [ ] The level of testing this PR includes is appropriate
- [ ] User facing strings, if any, are extracted into `*.resx` files
- [ ] All tests pass using the self-service CI.
- [ ] Snapshot of UI changes, if any.
- [ ] Changes to the API follow [Semantic Versioning](https://github.com/DynamoDS/Dynamo/wiki/Dynamo-Versions) and are documented in the [API Changes](https://github.com/DynamoDS/Dynamo/wiki/API-Changes) document.
- [ ] This PR modifies some build requirements and the readme is updated
- [ ] This PR contains no files larger than 50 MB
### Release Notes
(FILL ME IN) Brief description of the fix / enhancement. **Mandatory section**
### Reviewers
(FILL ME IN) Reviewer 1 (If possible, assign the Reviewer for the PR)
(FILL ME IN, optional) Any additional notes to reviewers or testers.
### FYIs
(FILL ME IN, Optional) Names of anyone else you wish to be notified of
3 Likes
G-G
March 5, 2025, 3:00pm
3
That is what I assumed, thanks a lot!
1 Like
A side note, the Formula node calculated with radians. Code Blocks and the Math nodes use degrees. I don’t know what happens with an automagical conversion, you should test it if you worked with angles.
Actually a good choice to remove the Formula Node. The result could differ from the Math Nodes.
This:
[image]
Has not the same result in the Formula Node:
[image]
The Math Nodes (which are also used in Code Blocks) work with Degrees and the Formula Node with Radians. Very confusing.
G-G
March 13, 2025, 9:40am
5
All good, I did not work with it at all, I was just updating documentation referring to it.