I’m attempting to create a Python routine running in Dynamo which creates room elevations (I appreciate that there are several available on the Internet - I want to write my own as a learning exercise).
So to create a Elevation Marker I need to specify a viewFamilyTypeId:
This ViewFamilyType will be used by all elevations hosted on the new ElevationMarker.
So in Python I’ve used a Filtered Element Collector to find these:
viewfamilies = FilteredElementCollector(doc).OfClass(View)
When I run the routine Dynamo outputs a list of views:
So this looks to have worked.
But when I try to pick out a view in Python with, say, viewfamilies I get the error:
TypeError: ‘FilteredElementCollector’ object is unsubscriptable
Any advice on whats going wrong? Its scriptable when outside Python in Dynamo as its referred to as a list and I can pick out items, but in Python it apparently isn’t…