Python script returns null

Any help would be welcome. I want to select a particular detail view and the beam in the detail view

import clr
clr.AddReference("ProtoGeometry")
from Autodesk.DesignScript import *
clr.AddReference("RevitServices")
import RevitServices

from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

clr.AddReference("RevitNodes")
import Revit

clr.AddReference("RevitAPI")

import Autodesk
from Autodesk.Revit.DB import *

views = UnwrapElement(IN[0])

doc = DocumentManager.Instance.CurrentDBDocument
elements=[]
elementinview = None

for view in views:
    if(view is ElementType):
    viewelement=Element(view)
    elementinview = FilteredElementCollector(doc, viewelement.Id).OfCategory (BuiltInCategory.OST_StructuralFraming).WhereElementIsNotElementType().ToElements().ToList().First()
    elements.append(elementinview)

OUT = elements

Please repost image with all drop down open.

have edited and reposted the image.

For this line:
viewelement=Element(view)

Try:
viewelement=doc.GetElement(view.Id)

Does not work.

You are feeding python the view types not the views

Can you properly format the python code so others can understand more easily? Highlight the code and use the </> button to turn it into code format. Then double check all of your indentation, especially in the for loop.