Understanding the dsrepoLockLibraryP SKILL API Function

This locking API allows a user to lock a library.

See Also
dsrepoLockCellP SKILL API Function Options
dsrepoLockLibraryP(
     t_libName
     [?tl_viewNames]
     [?silent t]
)
=> nil / (x_pass x_fail)

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

If an object in a library is already locked, then locking the library results in an explicit lock at the library level. The explicit lock on the cell, view, or file converts to an implicit lock. When you unlock the object later, you must unlock it at the library level.

Note: If you have a view open for read in a design edit window, and the user uses the API call to lock the library containing the view, the design edit window automatically changes to edit mode.