Table of Contents

preview

alias prvwFree

Bitmap export and the embedded 3D viewer require a vault login.

Display a stored PDM thumbnail in the console, export thumbnails to a folder, or open one locally cached model inside the console output area. The 3D viewer can also pop out into a separate window. Preview does not check out files, undo checkout, or silently download models.

Syntax

preview (-filePath <path> | -id <id> | -search <query>)
        [-mode bitmap|3d] [-directory <path>] [-format png|jpg|bmp]
        [-show] [-overwrite]

Use -id as an alternative to -filePath for the same operand. A required target still needs one selector, even though each alternative is optional individually. See File IDs and paths for selection rules and command-specific exceptions.

Parameters

Parameter Alias Required Description
-filePath, -f No Exact vault file path. Quote paths containing spaces. Relative paths use the current vault folder; a single leading backslash means the vault root.
-id No Positive PDM file ID. Shared IDs require an exact file path.
-search, -s No Standard PDM search expression, including CSV query input. Bitmap mode only. Edit=true is rejected.
-mode No bitmap (default) or 3d; autocomplete offers both.
-directory, -d No Export folder, absolute or relative to the current vault folder. Created if missing. Exports are filesystem images, not automatically added to PDM.
-format No Export format: png (default), jpg, or bmp. Requires a directory.
-show No Also show images when exporting. Without this switch, directory export displays no thumbnails.
-overwrite No Replace existing exports. Otherwise existing images are skipped. Requires a directory.
-search -s No Search query used to find matching files in the current directory. Also accepts a CSV query file: -search "<C:\Temp\queries.csv>". The first row is a header; each following row's first column supplies a query. Keep the angle brackets. Call pdmshell_describe_search for format limits and template examples. This is search input, not the command's -csv output report.
-filePath -f No Complete file path. Absolute or relative paths are allowed.
-directory -d No Export destination. Relative to the current vault folder, or absolute. Suppresses inline images unless -show is supplied. Does not add exports to PDM.

Specify exactly one of -filePath, -id, or -search.

Examples

preview -filePath "My Part.sldprt"
preview -id 123
preview -search "Name=%.sldprt;Recursive=true" -directory "C:\Exports\Part Previews"
preview -id 123 -directory "C:\Exports\Previews" -format jpg -overwrite
preview -id 123 -directory "C:\Exports\Previews" -show
preview -filePath "My Assembly.sldasm" -mode 3d

Bitmap display and export

Bitmap mode first reads the stored thumbnail for the file's current vault version; it does not launch SOLIDWORKS. If the thumbnail is missing, or PDM cannot retrieve it locally (0x8004040B / 0x8000FFFF), PDMShell reads an embedded PNG preview from an already cached SOLIDWORKS file, or tries the installed Windows thumbnail provider. This fallback is explicitly labelled local cached preview in the output: it may be an older version or include unchecked-in changes, and is not an archive-version thumbnail. Embedded previews show the file's saved Config-0/default preview, not necessarily the configuration currently selected in SOLIDWORKS. It does not download uncached models or use generic file icons. Permission and login failures do not trigger the fallback. If neither source supplies a thumbnail, the file reports an error. Individual file errors do not stop later search results; unrecovered errors mark the command failed.

Export filenames are FileNameWithoutExtension_FileID.ext, for example My Part_123.png. Images are processed and disposed one at a time. An existing export is only replaced after the replacement image has been written successfully. Canceling retains images already exported.

Inline display shows at most 20 images per command and retains only the latest 20 console thumbnails across commands. Older thumbnails become a released-preview notice. cls clears the images. Use directory export without -show for large searches: it does not retain thumbnails in the console.

CLI and MCP support bitmap export with -directory; inline display requires the standalone PDMShell UI.

Embedded 3D preview

Each 3D preview appears inline in the console transcript, at the point where its command produced output. Text and other previews can appear above and below it; there is no separate preview pane or tab. Each control has its own Pop out button to move that viewer into a resizable window. Dock back, or closing the pop-out window with its X button, returns it to the same transcript position without opening a second model.

It requires the installed and registered x64 eDrawings viewer in standalone PDMShell only. This adds no eDrawings dependency to the vault add-in. Machines without eDrawings can still use bitmap previews and export.

Get/cache the model and its references in PDM first. The viewer opens the local cached version, which may differ from the latest vault version or contain local edits. It does not fetch missing references, check out, or save the source model. Formats and interactive viewing features depend on the installed eDrawings version.

The header shows the filename, cached version, and current vault revision. If the cache is older, it also shows the latest vault version. The current revision describes the vault file, not necessarily the cached copy. None means no revision is assigned; Unknown means the metadata was unavailable. Hover over the header for the full path.

Loading status changes when eDrawings reports success or failure. Opening another model adds another independent inline control. To limit memory use, the session retains at most three live models, including popped-out viewers; older controls become a released-preview notice. Close preview releases only that model and closes its pop-out window. cls and closing/unloading the session release all previews.

3d accepts only -filePath or -id plus -mode 3d: search, export, format, show, and overwrite options are bitmap-only. Embedded 3D is unavailable in CLI, MCP, and vault add-in script hosts.

Search results report

Add -csv "C:\Reports\results.csv" when using -search to save operation results. The first columns are file ID, parent folder ID, file name and output, followed by status and error details. The report folder must exist. New vault reports are added to PDM; existing vault reports must be checked out by you on this computer and remain checked out. External reports are replaced. See CSV operation reports for command-specific outcomes.