I’m working on a command which gets the parameter value as a value string, but without the unit symbol.
In general it works in latest Revit versions (tested in 2023), but I don’t have older versions (<2021), so had to guess it.
Can anyone comment on the code or if anyone has an older Revit version and could check if it works?
I made it possible to work in pyRevit / RPS / Dynamo (at least I think so, haha!)
The trick is in the FormatOptions() which I need to put inside the AsValueString() in order to get the value in the same way as it is shown in UI, but without the unit symbol:
And FormatOptions as well as UnitUtils have changed since they added ForgeTypeId to API.
Probably later I’ll find some time to install an older Revit and try it myself. Will feedback then!