private static void ExportView(Autodesk.Revit.DB.View exportableView, DisplayStyle displayStyle, bool includeGeometricObjects, bool export2DIncludingAnnotationObjects, bool export2DGeometricObjectsIncludingPatternLines, out IList <XYZ> points, out ResultsSummary resultsSummary) { TessellatedGeomAndText2DExportContext context = new TessellatedGeomAndText2DExportContext(out points); CustomExporter exporter = new CustomExporter(exportableView.Document, context); exporter.IncludeGeometricObjects = includeGeometricObjects; exporter.Export2DIncludingAnnotationObjects = export2DIncludingAnnotationObjects; exporter.Export2DGeometricObjectsIncludingPatternLines = export2DGeometricObjectsIncludingPatternLines; exporter.ShouldStopOnError = true; exporter.Export(exportableView); exporter.Dispose(); resultsSummary = new ResultsSummary(); resultsSummary.numElements = context.NumElements; resultsSummary.numTexts = context.NumTexts; resultsSummary.texts = context.Texts; }