Around two years ago I asked for a method to find the angle of the current view. This got answered well and I’ve been using that python script for several years now:
However, I’m currently dealing with a Revit 2020 project which runs in Dynamo 2.x as well, and currently that Python script doesn’t give the right result anymore.
I’m really curious what changed, and especially if someone has an idea on how to tackle this problem.
That is the correct number. You just have to take into account the floating point precision. Add a round to the function to the python code, or use a Math.Round node on the returned result. 6 digits should be sufficient.
With shame I have to admit that the mistake was all mine here.
The angle I considered to be wrong, was an actual problem here and the program had been working as such for years, it had simply never been a problem until recently (no one ever turned the view 180 degrees because there was no need to).
The problem seems to have existed in the 2017-2019 version as well but I simply forgot to test it and the actual problem was completely somewhere else in the graph.