Null views in list of views on sheets

I’m trying to make a script that will quickly set Detail Level and Graphic Style for views on Sheets, but the mechanical floor plans show up in the View list (and the sheet list) as ‘null.’ all the other disciplines’ views show up in the lists.

Any clue as to what might cause some views to register as ‘null’ but read other views correctly?

My Sheet.Views note returns this warning
"Warning: Sheet.get_Views operation failed.
Unable to cast object of type ‘Revit.Elements.UnknownElement’ to type ‘Revit.Elements.Views.View’.
Sheet.get_Views operation failed.
Unable to cast object of type ‘Revit.Elements.UnknownElement’ to type ‘Revit.Elements.Views.View’.
Sheet.get_Views operation failed.
Unable to cast object of type "

There are three null entries in the Views list, which corresponds with the number of mechanical floor plans.

Hi, you could give the “Sheet.Views+” node from spring nodes a try. I suspect the issue is that you have some area plans on a few of your sheets and Dynamo fails to wrap those.

1 Like

I think the nulls are Views not on Sheets. Try Remove Nulls on its output.