DocumentExport(String, IListElementId, PDFExportOptions) Method |
Exports a selection of views in PDF format.
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntaxpublic bool Export(
string folder,
IList<ElementId> viewIds,
PDFExportOptions options
)
Public Function Export (
folder As String,
viewIds As IList(Of ElementId),
options As PDFExportOptions
) As Boolean
public:
bool Export(
String^ folder,
IList<ElementId^>^ viewIds,
PDFExportOptions^ options
)
member Export :
folder : string *
viewIds : IList<ElementId> *
options : PDFExportOptions -> bool
Parameters
- folder String
-
Output folder, into which file(s) will be exported. The folder must exist.
- viewIds IListElementId
-
Selection of ordered views to be exported.
The list must contain at least one valid view.
- options PDFExportOptions
-
Various options applicable to the PDF format.
Return Value
Boolean
True if all specified views are exported successfully,
False if exporting of any view fails, even if some views might have been exported successfully.
ExceptionsException | Condition |
---|
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.
|
ArgumentNullException |
A non-optional argument was null
|
FileAccessException |
Thrown when the target PDF file is inaccessible, e.g. already opened.
|
InvalidOperationException |
A PDF Export is already occurring on this document.
-or-
There are too many PDF Exports in progress (3).
-or-
A PDF Export cannot occur in the background in a Family document.
-or-
Export is temporarily disabled.
-or-
Exporting is not allowed in the current application mode.
|
InvalidPathArgumentException |
The folder does not exist.
|
See Also