Vault Scripts and Script Settings
From 4.0.80, standalone PDMShell uses one main editor for both standalone files and vault scripts. The separate Vault Script Editor toolbar button is replaced by choices under New, Open, and Save. Evaluate remains on the toolbar.

Screenshots show actual controls with sample data, not a live vault. The Handling screenshot below shows 4.1.9; earlier captures retain their stated versions.
Open or create a vault script
- Log in to the vault in the active PDMShell session.
- Choose New > Vault script for a new draft, or Open > Vault script… to choose an existing script.
- Edit the workflow in the visual editor. Use the code-view control to edit its command text.
- Open the gear-labeled Script settings panel to configure the vault behavior.
- Choose Save to publish the code, visual layout and settings to that vault.
Managing vault scripts requires the SOLIDWORKS PDM Edit add-ins permission. The document heading identifies the script and its vault. If you switch vaults, reconnect to the document's original vault before saving it or editing its conditions.

Scripts open in visual view first. The console remains below the editor. Drag the sidebar divider to resize settings; use its X to hide it and the Script settings gear to show it again.
With Show progress enabled, the running-script window stays visible above the active PDM Explorer window after commands and file or folder selection. It does not take keyboard focus or cover an open picker.
Script settings
| Tab | Settings |
|---|---|
| General | Script name, enabled state, progress display, and cancellation. |
| Triggers | PDM menu visibility and label, event triggers, conditions and condition test messages. |
| Access | Permitted users and groups. |
| Handling | Error handling, per-item script execution, and optional undo checkout when no vault license is available (next to Access). |

Expand Run on PDM events to choose trigger points. These settings govern execution through the vault add-in; Run in the main toolbar uses the active standalone session.
From 4.1.1, select Edit conditions (N)… to open the same text editor used by IF and until, with autocomplete and automatic syntax feedback. The button counts individual rules. Apply conditions updates the draft; Cancel preserves it. Blank vault gates mean no condition restriction. Conditions and permissions are saved together with the script, not independently. The explanation below Show condition test messages describes its runtime troubleshooting messages; leave it off for normal use.


See Permissions, Conditions, Command menu scripts, and Event trigger points for execution rules.
Handling errors
From 4.1.9, open Script settings > Handling to configure error handling for the saved vault script. These settings apply to menu/event runs and toolbar runs of that vault script. Choose Save to persist them.
Actual 4.1.9 controls with Stop script after a non-ignored error enabled for illustration. The error-handling options are off by default.
- Stop script after a non-ignored error: stop after the failing command. With this off, continue but still report the script's errors; completed changes are not rolled back.
- Ignore checkout already owned by this user on this computer: skip repeated checkout and log a warning only when the executing user and computer match the existing checkout.
- Ignore missing checkout targets: log a warning when checkout cannot find its target in the vault. Other commands and missing dependencies are not covered.
Other owners, permissions, connection failures, and unknown errors are never ignored. Cancellation still stops execution. These are saved script settings, not new command-line parameters or a global suppression of errors.
A PDM task stores a separate copy of these settings when importing a vault script. Change them on the task's Script page or import the script again; editing the source vault script alone does not update the task.
For a checkbox-by-checkbox explanation of the task properties screenshot and examples of when an existing checkout does or does not fail a task, see the task settings walkthrough.
Finish one selected item before starting the next
Enable Do not use optimized script execution under Handling to finish every line for one selected file or folder before moving to the next. Commands without placeholders also repeat for each item. The option is off by default; this mode is enabled if either the script's option or the executing user's global setting is on. It does not change which errors are ignored.
Handling: undo checkout when no vault license is available
Available from PDMShell 4.1.2. Existing scripts keep this option off unless you enable and save it.
Under Script settings > Handling (next to Access), enable Undo checkout when no vault license is available for a script triggered After file checkout (EdmCmd_PostLock).
If that script cannot start because the vault license pool has no usable license or all seats are occupied, PDMShell attempts to undo checkout only for files present in that checkout event and matching the script's conditions. It verifies the current checkout belongs to the logged-in user, this computer, and the event's folder before proceeding. It does not search for additional files or undo other users' checkouts.
Local file contents are retained; the undo does not check changes into the archive. Each file is refreshed and independently verified after the attempt. A warning summarizes files undone, already unlocked, skipped, or failed/unverified. Check skipped or failed files manually before continuing. PDM permissions and other add-ins can prevent recovery.
This option does not apply to toolbar Run, menu commands, other triggers, local-license mode, condition mismatches, ordinary command failures, or errors reading license settings. Remaining scripts for the same checkout event stop after this recovery attempt. Earlier scripts or changes made by other add-ins are not rolled back. PDMShell suppresses its own nested event scripts during recovery to avoid recursion.
For operations that must never complete without the script, consider a Before file checkout trigger instead; after-checkout recovery is best-effort, not an atomic rollback of the checkout operation.
Save and protect your draft
Vault edits remain local drafts until you explicitly Save. Vault scripts are not automatically saved. New/Open and closing a tab or the application prompt about unsaved changes. A failed or cancelled save does not discard the draft.
Before saving, PDMShell rereads the stored library and preserves unrelated scripts and their access settings. If the selected script changed or was removed since you opened it, saving is rejected and your draft remains in the editor. Save it as a new vault script or reopen the latest version.
When a change affects menus, triggers or permissions, PDMShell tells you to restart PDM Explorer so registration can refresh.
Save as standalone script… creates a .pdmshell file with code and visual layout, without vault settings. Save as vault script… creates and saves a new vault script immediately, including its code, layout and settings. No second Save is needed before selecting it in the task's Import vault script… list. Copying an existing vault script preserves its settings within the same vault and uses a unique copy name. Later edits still require Save; if saving fails, the unsaved copy remains in the editor for retrying.

Find or delete a saved vault script
Choose Open > Vault script… and type in the filter box to narrow the script list.

Select a script and choose Delete… to remove it. You must confirm the deletion. PDMShell rechecks permissions and refuses deletion if the script changed since the list was opened.
Warning
Deletion immediately removes the saved script and its settings from the vault. It cannot be undone in this dialog, and choosing Cancel afterward does not restore it. Keep a backup of important scripts and settings.
AI drafts and running
AI inside PDMShell works beside the unified editor. Use draft… replaces the draft's code after confirmation, preserves its vault settings, and expands the code area for review. It does not run or save the script.
Run executes in the active standalone session. Saving a vault script is a separate action.
Warning
Running commands can change real files or vault data even while the editor contains an unsaved draft. Stop requests cancellation; it does not undo completed operations. Vault add-in execution and standalone execution retain their respective licensing requirements.
Standalone-only editing
In 4.0.83 and newer, script editing, visual layout, conditions and AI assistance are available only in standalone PDMShell. The add-in keeps command/event execution, tasks, licensing, permissions and performance tools; it no longer hosts an editor or AI chat.
Open standalone PDMShell, log into the vault, and use New/Open > Vault script. Existing saved scripts and layouts remain supported. A PDM task stores an editable copy by default. Enable Link to vault script in task properties to load the latest saved code on each run; task-specific settings stay on the task. See PDM tasks.