I'm struggling to get the current revision of EDPM files when their revision is work-in-progress.
This is the part of the code where I have the problem:
Set epdmFolder = myVault.GetObject(EdmObjectType.EdmObject_Folder, result.ParentFolderID)
Set epdmfile = myVault.GetObject(EdmObjectType.EdmObject_File, result.ID)
Set result = search.GetNextResult()
ModelName = epdmfile.Name
RevisionNumber = epdmfile.CurrentRevision
In my company we work with revisions as follow: X1, X2, X3, etc.
When the file is having X1, X2, X3, etc. revision the code is returning the correct value but...
when the file is having X1.WIP, X2.WIP, X3.WIP, etc. it returns the RevisionNumber value as follow:
Example 1: File revision is X3.WIP it returns RevisionNumber = "X2"
Example 2: File revision is X2.WIP it returns RevisionNumber = "X1"
Example 3: File revision is X1.WIP it returns RevisionNumber = ""
It returns the last revision not work-in-progress.
I know when getting the current revision of a Solidworks file when you have it open it returns also work-in-progress revisions using the following code:
Does anyone know how to get the revisions even when they are work-in-progress from EPDM file properties?
I don't want to open every file to get the correct revision because the program will take a lot of time.