Skip to content

File locking

File locking makes sure only one person edits a managed document at a time. The lock is held by the vault server and records who holds it and since when. On disk, every managed file is read-only unless you hold its lock.

Lock a document before you change it. You can do that from:

  • Lock document and Unlock document on the CADVault tab in SOLIDWORKS;
  • the lock badge on the thumbnail in the Companion;
  • the Lock and Unlock button in a document’s details in the Viewer; or
  • Lock and Unlock in the right-click menu of any document list. In the Viewer’s Documents tab you can lock or unlock several selected documents at once.

Locking makes the file writable for you, also when it is already open in SOLIDWORKS. Unlocking makes it read-only again. Unlocking does not update the vault; use Save to CADVault for that first. The add-in refuses to unlock a document with unsaved changes until you save or discard them.

A lock covers one document. Locking an assembly does not lock its components, and a drawing is locked separately from its model. To lock several documents, select them in a list and lock them together.

Documents you create, register or revise are locked to you automatically.

The add-in guards every open vault document:

  • A document locked by someone else opens read-only, with a notice that names the lock owner.
  • Saving a document you have not locked is refused, with a message telling you to lock it first. This applies to Ctrl+S, Save All and background saves alike.
  • When someone else takes the lock while you have the file open, your copy becomes read-only. If you have unsaved changes, CADVault asks whether to save them as a copy, discard them or keep editing.
  • When a newer version of the file is on disk than the one you opened, CADVault loads the newer one before giving you write access. If you have unsaved changes, you choose between discarding them, keeping the file read-only, or saving a copy.
  • When CADVault cannot reach the vault server to check the lock, the save is blocked. After the connection is back, the add-in checks every open document again.

Documents in Review, Released or Obsolete cannot be locked. Moving a document into one of those states releases your lock. To change a released document, create a new revision; the new revision is locked to you.

  • Locked by and Locked are columns in the Viewer’s grid, search results, and BOM and where-used lists.
  • The Documents tab filter and the Locked filter in Search show All, Mine, All locked or Unlocked documents.
  • Every lock and unlock appears in a document’s Activity.

Locks do not expire. They stay in place when SOLIDWORKS or the workstation stops unexpectedly, and they are not released after a set time. When a lock is left behind, for example because a colleague is away, an administrator removes it with Force release in the Document console. The reason entered there is logged, and the former owner gets a notice.

Confirm that the owner is no longer working on the file before you force-release a lock.

Locking coordinates CADVault users. It does not replace access control, storage availability or backups of the Windows share.