In PDMWorks Enterprise, does anyone know how to determine ifthe user who initiated a command has the selected file alreadychecked out.
My addin requires that the selected file be checked out to performthe action. I think I can handle the exceptionE_EDM_FILE_NOT_LOCKED_BY_YOU, but I would rather test forthis condition so that an exception is not thrown.
Any help would be greatly appreciated!
Thanks,
JustinSolidworksSolidworks Pdm enterprise Pdm
My addin requires that the selected file be checked out to performthe action. I think I can handle the exceptionE_EDM_FILE_NOT_LOCKED_BY_YOU, but I would rather test forthis condition so that an exception is not thrown.
Any help would be greatly appreciated!
Thanks,
JustinSolidworksSolidworks Pdm enterprise Pdm

If objFile.IsLocked Then 'is it locked by me?
Dim userMgr As IEdmUserMgr5
userMgr = v8
Dim user As IEdmUser5
user = userMgr.GetLoggedInUser
If user.Name = objFile.LockedByUser.Name Then 'the file is alreadychecked out by me
CheckoutFile = True
End If
userMgr = Nothing
user = Nothing
End If
I missed the GetLoggedInUser method in the IEdmUserMgr5 interface.I could determine who had the file locked, I just couldn't figureout who the current user was. I appreciate the help.