Table of Contents

On-demand add-in scripts

Enable Menu when a script should appear as a right-click PDM command.

Command menu scripts are on-demand add-in commands. They are not SOLIDWORKS PDM Tasks and they do not have to wait for a workflow transition or event trigger. Administrators configure the script once in standalone PDMShell, then users launch it when needed from the PDM command menu against the selected file or folder. This is useful for repeatable operations such as file rename automation, metadata cleanup, export helpers, or any workflow where standard Dispatch actions are too limited for the required scripting logic.

Enter the menu text exactly as it should appear in the menu. Use backslashes to group commands:

PDMShell\Script 1
PDMShell\Rename Files
PDMShell\Engineering\Create PDF

When the user clicks the command, the add-in checks permissions, evaluates conditions, and runs the script against the selected file or folder context.

Selection targets

In 4.1.8 and newer, menu scripts keep the selected item type. A selected folder runs as that folder, even if a file has the same numeric ID. A selected file keeps its selected containing folder.

Mixed file and folder selections keep their order. If PDMShell cannot resolve an explicit selected target, the script fails safely instead of switching to a parent folder or another item.

Video: run a script on demand

This demo shows how the PDMShell add-in can run a script on demand inside SOLIDWORKS PDM. The example uses file rename scripting to show how custom logic can be launched directly from the PDM environment without creating a PDM Task.

Watch on YouTube

Notes

  • The command menu text is the user-facing label.
  • The script name is the administrator-facing identifier in the Script Editor.
  • If you change command menu text or enable or disable menu commands, choose Save in the main editor and restart Windows Explorer when prompted. You can also log out and back in to the vault to reload the PDM menu commands.