VB.NET SDK list documents and ignore versions

Using aaApi_SelectDocumentsByProjectId I am able to list the documents and iterate through them to find the document name I need to fetch from the server.

When ProjectWise Explorer has Show all versions enabled these show up in the list of documents. Then as I iterate through each document the old versions get fetched over the current document.

What's the best why to deal with file versions?

Parents
  • Kevin,

    It isn't clear to me what your issue is.  I think you are asking if there is a way to only get the active documents for a particular folder.  By using aaApi_SelectDocumentsByProjectId and then iterating through them, well, then it is up to you to "filter" the results.  You can look at the document property DOC_PROP_ORIGINALNO to determine if the document is an active document or not.

    You also say "to find the document I need to fetch from the server".  If you know the folder id that contains the document you are looking for, as well as the name of the document or file, then you might considering using aaApi_SelectDocumentsByProp() or aaApi_SelectDocuments2() as you can specify the document's name and/or filename.  Using either of those functions will then limit the results to the criteria that you specify, resulting in a smaller set of data to iterate through.  You may still need to determine if the document is the active document or not.

    Answer Verified By: Kevin Cox 

  • Thanks Dan,

    You're correct, I need the active documents in a folder and DOC_PROP_ORIGINALNO is what I needed.

    I do know the folder ID so I'll use one of the alternative functions you suggested.

Reply Children
No Data