Check if all elements have been relinquished without actually opening the file

Hi,

I would like to know if checking all elements have been relinquished without actually opening the file is possible?
Getting the login name in Revit of the person who still has some borrowed or owned elements would save some time. Background reporting maybe?

Thnx in advance

Hey @m.rijsmus,

Looks like it is possible with this method: http://www.revitapidocs.com/2018.1/1a4b4bbb-060d-1f42-fbb2-ab85081f8e7f.htm

But you would need to collect all elements in the document and iterate through, so i dont know if it would be a viable method, if you want to check an entire model :confounded:

Thank you Martin

What i would like is equivalent to opening the file, go to worksets, selecting all to be visible, and report on borrowed/owned.
No names there would suggest everybody checked out.

Its nice to see there is something in the API at least.
Now i need a Python course :slight_smile:

Found a workaround (carefull…danger)

Make an archive of the central file aswell as the backup folder for that file.

dump the .slog file

Hehe, that is an alternative solution that I do not have any experience with :smiley:

Edit:
This could be set up for multiple files :slight_smile: :

import clr

#Import the Revit API
clr.AddReference('RevitAPI')
import Autodesk
from Autodesk.Revit.DB import *

#Import DocumentManager and TransactionManager
clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager

#Reference the active Document and application
doc = DocumentManager.Instance.CurrentDBDocument

#Start scripting here:

exDoc = UnwrapElement(IN[0])

fec = FilteredWorksetCollector(exDoc).OfKind(WorksetKind.UserWorkset).ToWorksets()

output = []

for i in fec:
	output.append(i.Owner)
	
OUT = exDoc, output
1 Like