Revit: Extracting Level Names in Dynamo

A few weeks back, I had a request to be able to filter a Door Schedule by the Level to which the Doors in the project were associated. That is a choice if you are only scheduling Doors in the current model, but is not an option if your Schedule includes Doors in linked models. I suggested that a Dyanmo graph could be created that would read the Level of each Door and write the Level name to a separate parameter, which could then be used for filtering. The graph would need to be run in each of the models, and, if there are later changes that add more Doors, re-run. Pretty standard stuff for a Dynamo graph.

There is just one problem with that – the built-in Revit parameter Level does not return just the name of the Level, but instead returns what is shown in the image below.

I ran those results through the String from Object node to be certain the values were seen as strings. (I suppose I should try it without that node to see if it is really necessary, but I have not done so…
Read more