Expression Evaluator
The Expression Evaluator lets you test dynamic values before you run a command, script, task, or rename rule.
Use it when you want to confirm what a placeholder, PDM variable, or string function will become at runtime.
What It Helps With
The evaluator is useful for previewing:
- File and folder placeholders such as
$fileName,$filePath, and$folderPath. - Vault and user placeholders such as
$vaultName,$vaultRootFolder,$username, and$username.email. - Date and time placeholders such as
$date,$time,$yyyy, and$timestamp. - PDM variables such as
$(Description)or$(Description.@). - String functions such as
${before(...)},${replace(...)}, and${regex(...)}. - Revision functions such as
${revision()},${nextRevision()}, and${revisionComponentValue("ComponentName")}. - Expressions that will later be used in commands like
rename,setvar,bom,export,msgbox, oruntil.
Why Use It
The evaluator previews the result without changing files, setting variables, checking files in, renaming anything, or writing back to the vault.
This makes it a safe place to test expressions before using them in production automation.
How To Use It
- Open the Expression Evaluator from the PDMShell toolbar.
- Choose a PDM file or folder when the expression depends on file or folder context.
- Choose a configuration when the expression depends on configuration-specific variables.
- Choose a variable when you want
$valueto use the current value of that variable. - Type or choose the expression to test.
- Review the evaluated result.
The evaluator window shows the selected file or folder context, the optional variable and configuration inputs, the expression being tested, and the evaluated result.
Examples
$fileNameWithoutExtension
$(Description)
${before($fileNameWithoutExtension, "-")}
${replace($value, "DRAFT", "RELEASED")}
${regex($fileNameWithoutExtension, "^([^-]+)-", 1)}
${revision()}
${nextRevision()}
${revision("$folderPath\\$fileNameWithoutExtension.pdf")}
Revision Function Examples
Revision functions evaluate against the selected PDM file unless the function includes an explicit file path argument. The examples below use a drawing whose PDM Version tab shows the current revision as T-016-W.
Use ${revision()} when you need the current full revision display value. PDMShell formats the result using the active PDM revision scheme, so formatted components such as letters and zero-padded numbers are preserved.
${revision()}
Use component functions when you need to rebuild or inspect only part of the revision. In this example, the revision scheme has Letters and Numeric components. The current component values evaluate to T and 016, producing T-016-W.
${revisionComponentValue("Letters")}-${revisionComponentValue("Numeric")}-W
Use nextRevisionComponentValue when you need to preview the next formatted component values without changing the file. In the same scheme, the next values evaluate to U and 017, producing U-017-W.
${nextRevisionComponentValue("Letters")}-${nextRevisionComponentValue("Numeric")}-W
Revision function names are case-insensitive, but the documentation uses lowercase names for consistency.
File Context
Some expressions need a selected PDM file or folder to return a meaningful result.
Examples:
| Expression | Needs file or folder context |
|---|---|
$fileName |
Yes |
$filePath |
Yes |
$folderPath |
Yes |
$(Description) |
Yes |
${revision()} |
Yes |
${nextRevision()} |
Yes |
${revisionComponentValue("ComponentName")} |
Yes |
${revision("C:\Vault\File.pdf")} |
No, if the path is complete and the vault is logged in |
$vaultName |
No, if logged in |
$vaultRootFolder |
No, if logged in |
$date |
No |
$guid |
No |
$tempFolder |
No |