Exports a selection of views in PDF format.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 23.0.0.0 (23.1.0.0)
Since: 2022
Syntax
C# |
---|
|
Visual Basic |
---|
|
Visual C++ |
---|
|
Parameters
- folder
- Type: System String
Output folder, into which file(s) will be exported. The folder must exist.
- viewIds
- Type: System.Collections.Generic IList ElementId
Selection of ordered views to be exported. The list must contain at least one valid view.
- options
- Type: Autodesk.Revit.DB PDFExportOptions
Various options applicable to the PDF format.
Return Value
True if all specified views are exported successfully, False if exporting of any view fails, even if some views might have been exported successfully.Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.Exceptions ArgumentException | non empty list of views must be provided. -or- NullOrEmpty -or- There are duplicate views in viewIds -or- some of the views are not printable (exportable). -or- Thrown when one or more input arguments are invalid. |
Autodesk.Revit.Exceptions ArgumentNullException | A non-optional argument was null |
Autodesk.Revit.Exceptions FileAccessException | Thrown when the target PDF file is inaccessible, e.g. already opened. |
Autodesk.Revit.Exceptions InvalidOperationException | Export is temporarily disabled. -or- Exporting is not allowed in the current application mode. |
Autodesk.Revit.Exceptions InvalidPathArgumentException | The folder does not exist. |