File IDs and paths
From PDMShell 4.1.13, active commands exposing -filePath or -id offer both. Autocomplete, command help, the visual editor, and MCP expose these alternatives.
For example, these commands select the same file when ID 123 belongs to that path:
history -filePath "C:\Vault\Parts\Bracket.sldprt"
history -id 123
Use one target selector. For commands where search selects the target, choose -id, -filePath, or -search, not a combination. A required target is still required even when each alternative is individually optional in the parameter table.
ID resolution
- IDs must be positive whole numbers within the 32-bit integer range and require a connected vault. Supported expressions and session globals can supply an ID.
- An ID identifies the same operand as that command's
-filePath; it does not automatically select every file in a folder. - The new ID-to-path adapter resolves the exact vault location. If an ID has multiple shared locations, use an explicit
-filePathto choose one. - Resolving an ID does not download, check out, or check in the file. The command itself retains its normal effects, permissions, and licensing requirements.
- Paths containing spaces should be quoted. Relative-path handling remains command-specific; a resolved ID uses the full path.
Special cases
| Command | What the ID or path selects |
|---|---|
cd |
From 4.1.15, a folder or a file's containing folder. Choose -directory, -filePath, or -id; -idType Auto checks folder IDs first. Use -idType File when IDs overlap. |
runswmacro |
The macro file, not the affected model. Its model search is separate and may accompany -id. |
pasteasreference |
The file to insert as a reference; source/search selects the receiving files separately. |
CSV-input commands such as renamefromsource |
The input CSV file in the vault, not an item listed in the CSV. |
dump |
The existing output file; existing output safety restrictions still apply. Use a path for a new file. |
runscript |
The affected file; -source still identifies the script. Do not combine -id and -items. |
transition |
The affected file; do not combine -id and CSV -source mode. |
start |
The file to open; do not combine -id with process or SOLIDWORKS-version modes. |
cd -filePath "\Projects\Design Review"
cd -id 755
The legacy toolbox command remains disabled. New targeting options do not enable it.
See the command reference for each command's other required parameters.