Failed to Get Views

Hi all, anyone knows what’s wrong with this code?
it’s working fine before but now it keeps on failing…

Thanks…

import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *

clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)

viewsheetsets = UnwrapElement(IN[0])
elementlist = list()
for set in viewsheetsets:
	views = list()
	for view in set.Views:
		views.append(view)
	elementlist.append(views)
OUT = elementlist

Use the same custom node “ViewSheetSet.Views” from clockwork package it should work fine no need to copy paste python.

It’s the same error @Kulkul

image

Which clockwork package version your using?

latest one
image

Check under manage package settings.

image

Double click on the custom node and show screenshot of python code.

Go back to your dynamo graph and show watch node at All Elements of type.

Warning: IronPythonEvaluator.EvaluateIronPythonScript operation failed.
Traceback (most recent call last):
File “”, line 13, in
AttributeError: ‘List[object]’ object has no attribute ‘Views’

If you go manually and check sheetset did you see sheets in Revit?

Yup :slight_smile:

That’s working fine before, when i install pyrevit something strange happen (not sure if that’s the cause though) so i had to uninstall it, try to remove dynamo also and all other packages but now it’s still not working.

Could you share your rvt file here? If you are unable to drop then drop it google drive or dropbox and share the link here.