Understanding the dsrepoCancelLockFileP SKILL API Function

The cancel lock API allows a user to unlock a cell or library level file.

See Also
dsrepoCancelLockFileP SKILL API Function Options
dsrepoCancelLockFileP(
     t_fileName
     [?force  g_force]
     [?silent g_silent]
)
=> nil / (x_pass x_fail)

If the file is modified on disk, then the modifications are retained unless the ?force option is specified. If you specify the ?force option, the modifications are replaced by the last checked in version.

The command returns a list of pass and fail counts; the first integer represents the number of objects successfully unlocked and the second integer represents the number of failures. The dsrepoCancelLockFileP function lets you cancel the checkout for a single file only, so the returned list is (1 0) if the cancel is successful and (0 1) if the cancel fails. The function raises an error if argument checking fails. In all other failure cases, the function either raises an error or returns nil.

Note: If the file is opened for edit in a design edit window, and the user uses the API call to cancel the lock for the file, the design edit window automatically changes to read mode. If the file is open and modified, the cancel operation fails and alerts the user that the file has been modified.