Application: ExportPDFSettingsSample
Revit Platform: All
Revit Version: 2020.0
First Released For: 2020.0
Programming Language: C#
Skill Level: Medium
Category: Elements, Data Exchange
Type: ExternalApplication

Subject: ExportPDFSettings examples.
Summary: 
Provides examples for manipulating ExportPDFSettings.

Classes: 
Autodesk.Revit.DB.ExportPDFSettings
Autodesk.Revit.DB.PDFExportOptions
Autodesk.Revit.DB.TableCellCombinedParameterData

Project Files: 
Application.cs

Description: 
This sample provides:
•	Create ExportPDFSettings
•	Modify ExportPDFSettings
•	Add naming rule for ExportPDFSettings
•	Modify naming rule for ExportPDFSettings
•	Delete naming rule for ExportPDFSettings

Instructions: 
Open Revit application and execute the command.
1.	Create ExportPDFSettings Instance
a.	Execute “Create ExportPDFSettings Instance” command
b.	Open File -> Export-> PDF. In PDF Export dialog, in Export Setup you should see “sample”. This means sample ExportPDFSettings has been created.

2.	Modify ExportPDFSettings Instance
a.	Execute “Modify ExportPDFSettings Instance” command
b.	Open Export PDF dialog. In sample settings, Combine, Page Size and Hide Crop Boundaries are changed.

Exception:
a.	Modify instance before instance is created, or instance is deleted.

3.	Add naming rule
a.	Execute “Add Naming Rule” command
b.	In PDF dialog, “-<Approved By>-” is appended to File Name.
c.	Click Naming Rule, “Approved By” item is added to Name Parameter.

Exception:
a.	Settings instance is deleted.
b.	Exporting is set to combined, naming rule won’t be changed.

4.	Modify naming rule
a.	Execute “Modify Naming Rule” command
b.	In PDF dialog, the order of naming rule is changed.
c.	Open Naming Rule Setup, the sample value of “Approved By” is changed.

Exception:
a.	Settings instance is deleted.
b.	Exporting is set to combined, naming rule won’t be changed.
c.	Naming rule is deleted from list.

5.	Delete naming rule
a.	Execute “Delete Naming Rule” command
b.	Open PDF dialog, “Approved By” is deleted from naming rule list

Exception:
a.	Settings instance is deleted.
b.	Exporting is set to combined, naming rule won’t be changed.