Sample Code Revit Batch Processor 1.1.16 documentation
PDFDWGExporterUI is the settings interface for configuring how PDF and DWG exports are named. It lets you build a filename rule by combining Revit sheet properties (such as sheet number and sheet name) with optional prefixes, suffixes, and separators. Separate rules can be configured for PDF and DWG exports. Settings can be saved to and loaded from JSON files for reuse across projects.
The settings window is divided into the following sections from top to bottom:
Section |
Purpose |
|---|---|
Header banner |
Shows the application title and subtitle |
Message banner |
Displays status and error messages |
Document type selector |
Choose between PDF and DWG settings |
Parameter mapping area |
Build the filename rule by selecting and ordering sheet properties |
Export / Import buttons |
Save or load the current configuration as a JSON file |
Save button |
Commit the settings back to the project and close |
Control |
Description |
|---|---|
Document type dropdown |
Select PDF or DWG to switch which export’s naming rule you are editing |
DWG Export Scheme dropdown |
Visible only when DWG is selected. Choose the DWG export scheme to use |
Switching between PDF and DWG reloads the parameter mapping area with that document type’s current rule.
The central area is split into three columns.
Lists all Revit sheet properties available for use in the filename rule. Column header: Sheet properties.
Single selection.
Read-only — this is a reference list only.
Shows the ordered list of sheet properties that make up the filename, along with their formatting options.
Column |
Editable |
Description |
|---|---|---|
Prefix |
Yes |
Text prepended to this property’s value in the filename |
Parameter |
No |
The sheet property name (e.g., Sheet Number, Sheet Name) |
Suffix |
Yes |
Text appended to this property’s value |
Separator |
Yes |
Text inserted between this property and the next one in the filename |
Click any cell in the Prefix, Suffix, or Separator column to edit it directly.
Up / Down buttons below the grid reorder the selected row, controlling the order in which properties appear in the generated filename.
For each row in the rule grid, the output is:
[Prefix][Property value][Suffix][Separator]
Rows are concatenated in order to produce the final filename.
Example: With two rows — Sheet Number (no prefix/suffix, separator _) and Sheet Name (no prefix/suffix) — the filename becomes A101_Ground Floor Plan.
The export tool opens the Settings window before running an export.
Select PDF in the document type dropdown.
From the Sheet properties list, select a property and click Add Parameter to add it to the rule.
Edit the Prefix, Suffix, and Separator cells as needed.
Use Up / Down to reorder properties.
Switch to DWG and repeat to configure the DWG naming rule.
Optionally click Export to save the configuration for reuse.
Click Save To Project to apply the settings and close.