How to filter on active documents

How can I filter on active documents associated to an item?

I am connecting to a vault and getting a list of documents, but when I try to retrieve the path of the document I get an error because that document is not "in work".  I want to only get documents which are active.

SolidworksApi macros