I'm using a FilteredElementCollector to get all the 3D views in my project.
var views3D = new FilteredElementCollector(GlobalObjects.doc).OfClass(typeof(View3D)).Cast<View3D>();
This collector is returning all my 3D views, including a view that is not visible in my project browser. Trying to change the orientation of this invisible view (view3D.SetOrientation(viewOrientation3D)) is also returning an exception with the message:
{"View is missing its viewer."}
What is this "Viewer" property that makes some 3D views visible in the Project Browser and editable, while other not? I can't really look up this view with Revit LookUp since I can't find it anywhere but debugging the findings of my collector shows me that this view does not have an Origin, SketchPlane or CropBox. Are those it? How do I distinguish between 3D views that have viewers and 3D views that have not?
Solved! Go to Solution.