I’m working on a Dynamo script to automatically attribute parameters to elements of a model based on their location and I use mass as delimitations.
I actually managed to to it but I have a problem with Revit once I do; a pop-up appears telling me that I’m trying to checkout a large number of elements and that I should instead checkout worksets :
I’ve hidden some of the worksets names as they are work-related
Actually this error doesn’t stop me from using the script (I simply select “cancel” and it finishes correctly) but I’m not a fan of this kind of errors so I’d like to know why this append and possibly how I could fix it.
Note that this error occurred when I tried to work on ±13 000 elements but that I’d like to use it on even larger models (>40 000 elements) if possible so resolving this error now might be quite useful for further tests.
I couldn’t find much informations about this kind of error (only a issue report on Autodesk’s BIM360 forum ). For informations the models are indeed shared with BIM360 and I used Revit 2021 and Dynamo 2.6.1
If needed, I’d be happy to share my script (even though it would require some cleanup before doing so)
Please submit a standard support ticket as you would other Revit issues via the account portal at Manage.Autodesk.com.
This pop up is effectively telling you that you’ve touched so many things at once that it’s going to take longer than you may like, and that worksharing conflicts are likely (as a colleague could be using those elements).
The reason for the ticket is so that we can get this in the Revit teams radar, as that workflow may want to change as users do more and more automation.
As a workaround you can check out all the worksets before running the graph via the worksharing dialog.
Curious if forcing them through a worksharingutils method as well as initially checking if they are owner by another user might help? I’ve been using these two things a lot lately, after finding most users run my scripts in a large firm when people have checked out a myriad of things any which way.
I’m guessing that the worksharingutils method is basically being used behind the scenes anyway, so guessing not. Curious, though. Maybe you could loop through a transaction by breaking down the elements into more manageable chunks in a loop? I’ve had to do this in the past when reviewing warnings in excess of 2000 (it gives up returning warning related elements at some point in Python, but can handle doing it in subsets and list levels applied to a custom node using python within).
Python script below which verifies checkout status if it helps too… not released in Crumple yet.
# Made by Gavin Crump
# Free for use
# BIM Guru, www.bimguru.com.au
# Boilerplate text
from RevitServices.Persistence import DocumentManager
from Autodesk.Revit.DB import *
# Current doc/app/ui
doc = DocumentManager.Instance.CurrentDBDocument
# Define list/unwrap list functions
result = input if isinstance(input, list) else [input]
# Preparing input from dynamo to revit
uw_list = uwlist(IN)
status,checkedOut = ,
# Do some action in a Transaction
for e in uw_list:
cs = WorksharingUtils.GetCheckoutStatus(doc,e.Id).ToString()
checkedOut.append(cs != "OwnedByOtherUser")
for e in uw_list:
# Preparing output to Dynamo
OUT = [status,checkedOut]