I created a Dynamo graph that modify the project units (imperial or metric) and it doesn’t work anymore with Revit 2022. I saw that there was some modification to the API related to units in Revit 2022. I’m not programmer, I’m just someone that had interest in Dynamo so I don’t really know the terms in the industry. I know that DisplayUnitType was now replaced, but other than that, I don’t know how to make it work…
Here’s the part of the graph that now fail.
unit = doc.GetUnits()
format = FormatOptions(DisplayUnitType.DUT_MILLIMETERS,1)