If this file is SolidWorks file and you have a file in your local cache just use Document Manager API to read custom properties (all ePDM variables for SolidWorks files are stored in custom properties). This will be easy and safe solution without a need to lock a file or even open it with write access.
Application Engineer at Intercad
Tel: +61 2 9454 4444
Try using the IEdmBatchListing2 interface.
Good suggestions - however I was still curious why the native ePDM calls weren't working.
I saw in another thread someone talking about sending in a "@" for the configuration name. I tried that and it worked for BOTH calls and regardless of whether the file was checked out or not.
Very interesting, and directly contradicts the documentation which states you need to send in a blank string for files where configurations aren't applicable (I'm using this function on a SolidWorks drawing). I guess in this case configurations are applicable, at least the name... and is supported by the first tab on the file data card for a SolidWorks drawing being named "@".
Thought this was worth posting in case someone else runs into this same issue.