checkin
Description
Performs a check-in operation on a specified file or many files.
Syntax
checkin -search -recursive -filePath -comment -Checkinoptions
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 |
|---|---|---|---|
-search |
-s |
No | The search operation to use. |
-recursive |
No | When used with search, includes files in subfolders. |
|
-filePath (default) |
-f |
No | The file(s) to be checked in. This is the default parameter. |
-comment |
-cmt |
No | The comment to add to the check-in. In the visual command builder, the default value is Checked by PDMShell. |
-Checkinoptions |
-ciopt |
No | The check-in options to use. |
-id |
No | Positive PDM file ID instead of -filePath, identifying the same file that -filePath describes (including a macro, input CSV or existing output file). Requires a connected vault. Shared files with multiple locations require an exact -filePath. Resolving the ID itself does not download, check out or check in the file; the requested command still performs its normal operation. |
Examples
checkin -filePath "file1.sldprt"
Remarks
Files already checked in are successful skips rather than errors. This applies to individual files and searches. Genuine check-in failures still propagate to script/task status; a later successful file does not erase an earlier failure.
- The search parameter searches the current directory and does not drill down. The search query is a PDM one, so you can use
%for wildcard. - If combining
Checkinoptionsparameters, the user needs to add+between the values.
Checkinoptions Parameter Values:
| Member | Description |
|---|---|
| EdmUnlock_FailOnRegenerationNeed | Fail if the file needs to be regenerated in the CAD program. NOTE: Only files resaved in SOLIDWORKS 2009 or later can trigger this flag |
| EdmUnlock_ForceUnlock | Unlock the file even if it is not modified |
| EdmUnlock_IgnoreCorruptFile | Ignore files with file formats unrecognized by SOLIDWORKS PDM Professional; without this flag, SOLIDWORKS PDM Professional returns E_EDM_INVALID_FILE if it encounters a corrupt file or a file containing a newer format than SOLIDWORKS PDM Professional can handle |
| EdmUnlock_IgnoreReferences | Silently unlock parent files without their references |
| EdmUnlock_IgnoreRefsNotLockedByCaller | Ignore references not locked by caller |
| EdmUnlock_IgnoreRefsOutsideVault | Ignore references to files outside the vault |
| EdmUnlock_KeepLocked | Keep the file checked out after creating the new version in the archive |
| EdmUnlock_OverwriteLatestVersion | Do not create a new version; overwrite the last version of the file with new changes |
| EdmUnlock_RemoveLocalCopy | Remove the local copy of the file from the hard disk after the file has been checked in |
| EdmUnlock_Simple | Check in the file using default behavior |
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.