PDME Addin: How to determine if current user has file checked out?

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