Table of Contents
Get a 7-day trial No commitment or credit card required. Professional email required.

Placeholders and Dynamic Variables

Placeholders let one task create paths, filenames, sheet filters, bookmarks, and annotations from information about the file being processed. PDMPublisher evaluates each placeholder on the machine that processes the task and replaces it with its current value.

Note

The placeholders available in a field are shown in its >... menu. Not every field offers every placeholder.

Built-in Placeholders

Placeholder Value Example
(VaultRootFolder) Local root folder of the current PDM vault on the task host. C:\PDMVault
(FileNameWithoutExtension) Source filename without its extension. Bracket
(FileName) Source filename with period characters removed. BracketSLDPRT for Bracket.SLDPRT
(FileNameNumberRange) Numeric filename grouped into a range of 1,000. Non-numeric names return the filename without its extension. 11000-11999 for 11345.SLDPRT
(FileNameNumberFirst3Digits) First 3 digits of the first numeric sequence in the filename. 123 for PART-123456-A.SLDPRT
(FileNameNumberFirst4Digits) First 4 digits of the first numeric sequence in the filename. 1234 for PART-123456-A.SLDPRT
(FileNameNumberFirst5Digits) First 5 digits of the first numeric sequence in the filename. 12345 for PART-123456-A.SLDPRT
(FileNameNumberFirst6Digits) First 6 digits of the first numeric sequence in the filename. 123456 for PART-123456-A.SLDPRT
(FileNameNumberRangeFirst3Digits) Range calculated from the first 3 digits of the first numeric sequence. 100-199 for PART-123456-A.SLDPRT
(FileNameNumberRangeFirst4Digits) Range calculated from the first 4 digits of the first numeric sequence. 1000-1999 for PART-123456-A.SLDPRT
(FileNameNumberRangeFirst5Digits) Range calculated from the first 5 digits of the first numeric sequence. 10000-19999 for PART-123456-A.SLDPRT
(FileNameNumberRangeFirst6Digits) Range calculated from the first 6 digits of the first numeric sequence. 100000-199999 for PART-123456-A.SLDPRT
(FileFolder) Local folder containing the file currently being processed. C:\PDMVault\Projects\Speaker
(TopAssemblyFolder) Folder of the top-level file that launched the task. For a task launched on one part or drawing, this is that file's folder. C:\PDMVault\Projects\Speaker
(TopAssemblyName) Filename of the top-level file without its extension. This also represents the top-level part or drawing when the task was not launched on an assembly. speaker
(State) Current PDM workflow state of the source file. Released
(ConfigurationName) SOLIDWORKS configuration being exported. The PDM @ configuration is written as At. Default or Machined
(Version) Current PDM file version number. 12
(Revision) Current PDM revision. The result is empty if the file has no revision. B
(Date) Current date on the task host, using its short-date format with / replaced by -. 8-13-2026
(Extension) Source file extension without the period. sldprt
(TargetExtension) Destination format extension when the current operation supplies a target format. pdf, dxf, or step
(User) PDM user logged in on the computer processing the task. TaskHostUser
(LaunchingUser) PDM user who launched the task. This can differ from (User) when another computer or account processes it. jsmith
(BOMQuantity) Quantity calculated for the file from the selected BOM template and task reference data. 4

File and Top-Level Values

(FileFolder) follows the individual file currently being exported. (TopAssemblyFolder) and (TopAssemblyName) remain tied to the file that launched the task while PDMPublisher processes its references.

For example, when Speaker.SLDASM launches a task and PDMPublisher processes Components\Cone.SLDPRT:

Placeholder Example result
(FileFolder) C:\PDMVault\Projects\Speaker\Components
(TopAssemblyFolder) C:\PDMVault\Projects\Speaker
(TopAssemblyName) Speaker

Configuration Name

(ConfigurationName) returns the configuration associated with the current output. It is especially important when Convert Multiple Configurations is enabled because it prevents outputs from different configurations from using the same name.

The placeholder can also be used by Sheet Name Pattern. For a multi-sheet drawing, PDMPublisher evaluates it from the associated model and matches the resulting configuration name against the drawing sheets. If the evaluated configuration name matches no sheet, version 2026.08.09 and later exports all drawing sheets and logs the fallback.

BOM Quantity

(BOMQuantity) uses the quantity calculated from the selected Template. Reference-aware quantity calculation requires the template fields described on that page.

When Ask User to Select Configuration is enabled, the quantity entered on task launch multiplies (BOMQuantity). For example, a calculated quantity of 2 and a custom multiplier of 3 produce 6. The task log records the applied quantity information.

Source and Target Extensions

(Extension) describes the source file. For example, a drawing exported to PDF has an (Extension) value of slddrw.

(TargetExtension) describes the requested output format when that operation supplies one. PDMPublisher normally adds the output extension automatically, so do not add another period and extension after this placeholder unless the destination field specifically requires it.

PDM Variable Placeholders

PDM variables use this format:

($VariableName)

The PDM Variables submenu lists the variables available in the vault. Select a variable from the menu instead of typing it manually so its name and $ prefix are correct.

Examples:

Placeholder Example value
($Document Number) 11345
($ProjectNumber) P-24017
($Description) Speaker frame

By default, PDMPublisher reads the value associated with the configuration being processed. Enable Use @ Tab to Evaluate Paths when the variables used by Export Location or Filename are stored on the file's @ tab.

Note

An empty or unavailable PDM variable evaluates to an empty value. When PDMPublisher evaluates an associated drawing and its value is empty, it may read the variable from the matching part or assembly.

SQL Placeholders for Annotations

SQL placeholders are available only for annotation SQL queries. They replace the token in the query with a filename before PDMPublisher runs the query.

Placeholder Filename supplied to the query
($SQL-Filename) Current filename with its existing extension.
($SQL-Part) Current filename changed to .sldprt.
($SQL-Assembly) Current filename changed to .sldasm.
($SQL-Drawing) Current filename changed to .slddrw.

For connection strings, query examples, testing, and security guidance, see SQL Query Placeholders.

Combined Path Example

The following Export Location combines built-in and PDM variable placeholders:

(VaultRootFolder)\Released PDFs\($ProjectNumber)\(FileNameNumberRange)\(State)

For 11345.SLDPRT, project P-24017, and state Released, it evaluates to:

C:\PDMVault\Released PDFs\P-24017\11000-11999\Released

File Name Number Range

Use (FileNameNumberRange) to group files with numeric filenames into folders or output names covering 1,000 numbers.

PDMPublisher removes the file extension, reads the complete filename as a number, rounds down to the nearest thousand, and returns the beginning and end of that range.

Source filename (FileNameNumberRange) result
1000.SLDPRT 1000-1999
11345.SLDASM 11000-11999
19999.SLDDRW 19000-19999
25001.SLDPRT 25000-25999

For example, this export location:

(VaultRootFolder)\Released PDFs\(FileNameNumberRange)

evaluates for 11345.SLDPRT as:

C:\PDMVault\Released PDFs\11000-11999

Important

The complete filename without its extension must be numeric. A filename such as 11345-A.SLDPRT, PART11345.SLDPRT, or Bracket.SLDPRT is not treated as a number. When the filename is not numeric, (FileNameNumberRange) returns the actual filename without the extension.

Source filename Fallback result
11345-A.SLDPRT 11345-A
PART11345.SLDPRT PART11345
Bracket.SLDPRT Bracket

You can insert this placeholder from the >... placeholder menu in fields that support dynamic values, including Export Location and Filename.

For filenames below 1000, the range begins at zero. For example, 245.SLDPRT returns 0-999. Leading zeros are not preserved: 00123.SLDPRT also returns 0-999.

File Number Placeholders

Version 2026.08.08 adds placeholders that extract the beginning of the first continuous numeric sequence found anywhere in the filename. The file extension is not included in the search.

You can find these placeholders under File Number in the >... placeholder menu.

For PART-123456-A.SLDPRT, the first numeric sequence is 123456:

Placeholder Result
(FileNameNumberFirst3Digits) 123
(FileNameNumberFirst4Digits) 1234
(FileNameNumberFirst5Digits) 12345
(FileNameNumberFirst6Digits) 123456

If a filename contains more than one numeric sequence, PDMPublisher uses the first one. For example, (FileNameNumberFirst3Digits) returns 123 for PART-123-REV-02.SLDPRT.

If the numeric sequence is shorter than the requested length, PDMPublisher returns all available digits. For example, (FileNameNumberFirst6Digits) returns 42 for PART-42-A.SLDPRT.

If the filename contains no digits, the placeholder returns the complete filename without its extension. For example, (FileNameNumberFirst3Digits) returns Bracket for Bracket.SLDPRT.

File Number Range Placeholders

The File Number Range menu contains the original (FileNameNumberRange) placeholder and four new prefix-based range placeholders.

The new placeholders first extract 3, 4, 5, or 6 digits using the corresponding File Number behavior. They then round that number down to a range based on the extracted length:

Placeholder Result for PART-123456-A.SLDPRT
(FileNameNumberRangeFirst3Digits) 100-199
(FileNameNumberRangeFirst4Digits) 1000-1999
(FileNameNumberRangeFirst5Digits) 10000-19999
(FileNameNumberRangeFirst6Digits) 100000-199999

For example, the export location:

(VaultRootFolder)\Released PDFs\(FileNameNumberRangeFirst4Digits)

evaluates for PART-123456-A.SLDPRT as:

C:\PDMVault\Released PDFs\1000-1999

If fewer digits are available than requested, the range uses the number of digits that were found. For example, (FileNameNumberRangeFirst6Digits) returns 10-19 for PART-12-A.SLDPRT.

Note

Range results do not preserve leading zeros. For example, (FileNameNumberFirst3Digits) returns 001 for PART-001234.SLDPRT, but (FileNameNumberRangeFirst3Digits) returns 0-99.

If the filename contains no numeric sequence, a range placeholder returns the complete filename without its extension.

Invalid Characters and Empty Values

When placeholders are used to create paths or filenames, values containing characters that Windows does not permit in a filename are cleaned before the output is saved. The task reports the variable that contained an invalid character.

If a value such as Revision or a PDM variable is empty, the placeholder contributes an empty string. Include separators carefully so an empty value does not leave an unwanted trailing dash or extra folder level.