SOLIDWORKS PDM Professional API Help Send Feedback
LockFile Method (IEdmFile5)
See Also  Example
EPDM.Interop.epdm Namespace > IEdmFile5 Interface : LockFile Method (IEdmFile5)


lParentFolderID
ID of parent folder to which to check out the file
lParentWnd
Parent window handle
lEdmLockFlags
Optional combination of EdmLockFlag bits; default is EdmLockFlag.EdmLock_Simple
Checks out this file from the vault to which the user is currently logged in.

Syntax

Visual Basic 
Sub LockFile( _
   ByVal lParentFolderID As System.Integer, _
   ByVal lParentWnd As System.Integer, _
   Optional ByVal lEdmLockFlags As System.Integer _
) 
C# 
void LockFile( 
   System.int lParentFolderID,
   System.int lParentWnd,
   System.int lEdmLockFlags
)
C++/CLI 
void LockFile( 
&   System.int lParentFolderID,
&   System.int lParentWnd,
&   System.int lEdmLockFlags
) 

Parameters

lParentFolderID
ID of parent folder to which to check out the file
lParentWnd
Parent window handle
lEdmLockFlags
Optional combination of EdmLockFlag bits; default is EdmLockFlag.EdmLock_Simple

Example

Remarks

When checking out several files, it is more efficient to use IEdmBatchGet than to repeatedly call this method to check out every file.

See Return Codes for the complete list of potential success and error codes. The following are just a few examples:

  • S_OK: The method successfully executed.
  • E_EDM_FILE_IS_LOCKED: The file is already checked out.
  • E_EDM_PERMISSION_DENIED: The user lacks permission to check out this file.
  • E_EDM_OPERATION_REFUSED_BY_PLUGIN: One of the installed EdmCmdType.EdmCmd_PreLock hooks did not permit the operation.
  • E_EDM_FILE_NOT_FOUND: The file was not found in the vault.
 

See Also

Availability

SOLIDWORKS PDM Professional Version 5.2