The team working on the Dynamo Core, as well as the team integrating that core into Revit, have been very busy over the last year. Revit 2022 comes with Dynamo Core version 2.10.1 which has lots of improvements since version 2.6.1 which is the latest version included with Revit 2021. Below are a list of the top 5 new features included with the release of Revit 2022.
1. Undock View Extensions
Dynamo is finally getting into the idea that most people have a second monitor, or at least like to control where their pallets are located. With that, Dynamo now has the ability to undock pallets from the main view and let them float, including on a second screen.[caption id="attachment_35236" align="aligncenter" width="469"] Dynamo Undock View Extension[/caption]
2. New Dynamo Core Nodes
The Dynamo core teams has been focusing a lot of time on back end improvements, one of the big changes is mentioned further down in this list. However they also took the time to add a few new nodes. Two of them are AnyTrue and AnyFalse. These will look at a list of true / false boolean values and find if there are any true or any false values within that list, or any of the sublists. This can be helpful when comparing lists of data. For a detailed explanation of these two nodes, look here.[caption id="" align="aligncenter" width="552"] Dynamo AnyTrue and AnyFalse Nodes[/caption]
3. Auto Complete
This feature will recommend nodes for the input field of a node. If a recommended node cannot be found the standard input nodes (string, number slider, integer slider, number and T/F boolean) will be displayed. To use this feature, first you must enable it from the Settings menu, under the Experimental flyout menu check "Enable Node Auto Complete". Now when you hold the "ALT" key and left click on a nodes input a menu will appear suggesting nodes to utilize for the input. If you click on one of these nodes, it will place the node and automatically draw a wire between that nodes output and the current nodes input, see below.[caption id="attachment_35221" align="aligncenter" width="707"] Dynamo for Revit Autocomplete example.[/caption]
4. Python Updates
One of the biggest things the Dynamo Core team has been working on is the transition from ironpython which limits python to version to 2.7 to Cpython which allows the use of python 3 syntax. This is HUGE for using python to access addition elements in the Revit API, as well as to handle more complex logic scenarios. As of the initial launch of Revit 2022, both ironpython and Cpython are installed as python engines and the engine used can vary within a single dynamo script (although that is not advised). Ironpython remains the default python engine, but can be changed in the settings. To help with the transition, there is a transition tool that will help migrate your python script from ironpython to Cpython.Additionally, they added the ability to see white space characters. This is very important with the aforementioned changed from ironpython to Cpython. Ironpython let indents be either tabs or spaces, and long ago hitting the tab key would insert a tab not 4 or 5 spaces. Cpython will only allow spaces as the indent, and does not accept the use of tabs. And besides that, isn't it nice to actually see the whitespace characters?
[caption id="attachment_35240" align="aligncenter" width="900"] Dynamo Python Editor Update[/caption]
5. New Dynamo for Revit Nodes
There are over 52 new nodes just to control Revit elements. That does not include any new nodes that the Dynamo Core has added. A lot of these are focused around views, schedules, and sheets. This includes adding views to sheets, setting their locations, setting the crop, discipline, and display styles of views. They also added nodes to provide the ability to override elements in a specific view, including hiding that element in a view. The below image shows the list of View nodes in Dynamo for Revit 2022 with those of Dynamo for Revit 2021.[caption id="attachment_35243" align="aligncenter" width="470"] Dynamo for Revit New Nodes[/caption]