I’m trying to use WorksharingUtils.GetUserWorksetInfo on a closed model by passing a path string into a Python script. I can convert the path to a FilePath object as below:
But when I uncomment and run with the highlighted line active, I get this error:
Exception: The Revit model specified by path doesn’t exist.
What am I doing wrong?
That method is incredibly flaky - it has something like 10 different exceptions. Ideally, you’d want to use a try/except statement to prevent an exception from breaking down your whole code. Even more, you could import the python traceback module and capture the actual error message (this is a great trick that I learned from Konrad Sobon’s awesome work)