You could use this method to check the local version number. If it is not in epdm yet or it's checked out, it will return -1. I believe it will also return -1 if the user doesn't have a local copy.
If you want to then get the latest file, you can use the following function. If you don't pass a revision argument, it will get the latest file.
Check the file out before you process it. This will make PDM download a local copy.
I use this to loop through folders in PDM to find drawing files.
Dim vault As EdmVault5
Dim Nfile As IEdmFile5
Dim Vfolder As IEdmFolder5
Set vault = New EdmVault5
'CHANGE THIS TO YOUR VAULT NAME
If Not vault.IsLoggedIn Then
vault.LoginAuto "Vault", 0
'CHANGE THIS PATH TO THE FOLDER OF YOUR CHOICE
Set Vfolder = vault.GetFolderFromPath("C:\Vault\projects\")
If Vfolder Is Nothing Then
MsgBox "Folder was not found"
Dim FilePos As IEdmPos5
Dim CurFolder As IEdmFolder5
Dim Vfile As IEdmFile5
Set CurFolder = Vfolder
Dim FolderPos As IEdmPos5
Set FolderPos = CurFolder.GetFirstSubFolderPosition
Do While Not FolderPos.IsNull
Dim SubFolder As IEdmFolder5
Set SubFolder = CurFolder.GetNextSubFolder(FolderPos)
'iterate through sub folders
Set FilePos = CurFolder.GetFirstFilePosition
Do While Not FilePos.IsNull
Set Vfile = CurFolder.GetNextFile(FilePos)
'only need drawings
If Right(UCase(Vfile.Name), 7) = ".SLDDRW" Then
Does this also open files that are not locally stored?