|
Fix broken SOLIDWORKS PDM references in bulk
Select a folder and one PDMShell script checks out the tree, repairs references, writes a CSV report and checks everything back in.͏ ͏ ͏ ͏
|
|
| |
| PDMShell recipe · Update References |
Repair hundreds of broken references in one pass
Copied projects, customer packages and migrations leave assemblies pointing at paths that no longer exist. This PDMShell script works on a whole folder tree: check out, update references against the files in that tree, write a CSV report of every change and check in. No SOLIDWORKS session needed.
|
What the script does
✓ | Checks out every checked in file in the selected folder and its subfolders. |
✓ | Updates references with PDM, without opening SOLIDWORKS. |
✓ | Writes a CSV report of every reference it changed. |
✓ | Checks the files back in with the comment References updated by PDMShell. |
The script
If folder exists "$localPath" GoTo Folder_UpdateReferencesAndCheckIn msgbox -value "Select a vault folder, not a file, to update references recursively." -icon "Information" GoTo End_UpdateReferencesAndCheckIn Folder_UpdateReferencesAndCheckIn: cd -directory "$localPath" checkout -search "Name=%;FolderID=$folderID;FindFiles=true;FindFolders=false;Locked=false;Recursive=true" updatereferences -search "Name=%;FolderID=$folderID;FindFiles=true;FindFolders=false;Locked=true;LockedBy=$userName;LockedOnComputer=$computerName;Recursive=true" -directory "$localPath" -scope UpdateAllReferences -csv "$tempFolder\PDMShell-reference-update-$folderID-$GUID.csv" checkin -search "Name=%;FolderID=$folderID;FindFiles=true;FindFolders=false;Locked=true;LockedBy=$userName;LockedOnComputer=$computerName;Recursive=true" -comment "References updated by PDMShell" End_UpdateReferencesAndCheckIn: |
|
|
|
|
|
|
bluebyte.biz · PDMShell · PDMPublisher · Docs
Blue Byte Systems Inc. · 170-422 Richards St, Vancouver, BC V6B 2Z4, Canada
You are receiving this because you subscribed to Blue Byte Systems updates.
Manage preferences · Unsubscribe
|
|
|