UnknownElement ... for some projects

So… I’m lost.

What I’m trying to do:
-from a sheetlist:
-get me all views
-without legends.

The problem:
Why are Views / Viewports throwing me a ‘UnknownElement’ when using OOTB Sheet.Views?

When I use Springs … I get a decent answer, but asking it’s ViewType() results in again … an UnknownElement.

import clr

clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
doc = DocumentManager.Instance.CurrentDBDocument

clr.AddReference("RevitAPI")
from Autodesk.Revit.DB import FilteredElementCollector

clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)
e = IN[0]
OUT = e.ViewType()

Hi @3Pinter,

Did you try with :
e= UnwrapElement (IN[0]) ?

You can also use the node Collector of PlacedViews
Collector%20of%20PlacedViews

@Alban_de_Chasteigner,

Oops, I forgot to post my errors.


Clipboard02

Unwrap … grrrr ofcourse. :man_facepalming:t2:

Now it works, still unsure why Sheet.View throws me that error.