This week I’ve been getting my Revit installation working again – it had been a while since I’d used it, and it was overdue an upgrade from 2021 to 2022 – mainly because I have to publish a couple of new packages (or package versions) to the Dynamo Package Manager.
The first is a minor update to the Space Analysis package, taking it from version 0.3.3 to version 0.4.0. There is a breaking change, however, in that people using the Visibility nodes from Python may have to modify their code to use the correct (newly added) namespace.
The reported error is quite clear, in that we have to modify line 9 of the Python script:
Adding “SpaceAnalysis.” as a prefix is the way to get the node properly resolved:
Saving the Python script and running it shows that it works fine:
Here’s the fixed version of the graph, so you don’t need to migrate it yourselves.
Hopefully it’s obvious why adding a namespace is a good thing – it makes it more obvious that the nodes are grouped in a single package, and reduces the risk of name-clashes with other libraries – and with any luck it won’t affect people very much in terms of the migration effort required. (If you’re not creating the SpaceAnalysis nodes inside a Python script then the chances are you’re not going to see any migration effort at all: nodes that have been added to the graph will continue to work as they did before.)
Another change in this version will hopefully address something Jon Pierson came across during his awesome walk-through on using Space Analysis with Revit. This is such a cool video – I thoroughly recommend watching it, if you have the time and interest.
A couple of times Jon came across some “interesting” behaviour from Space Analysis where it showed perhaps more than strictly made sense. While we weren’t able to reproduce this behaviour on our side, Rhys was able to make a fair guess at what’s happening and how to fix it, which he has hopefully managed to do this update.
Next week we’ll be unveiling the evolution of Space Analysis, a voxel-based system that will be usable for 3D path-finding and visibility analysis. Watch this space!