Saving a Background Opened-Document as a Workshared Model

Has anybody experienced this whilst using the Rhythm package to “uprev” models (i.e from Revit 2019 to Revit 2022).

When the dynamo definition is ran the models are opened in the background I believe, because I can see the conversion from 2019 to 2022, but it doesn’t want to save back over the top of them.

I have tried the files in other locations incase it was a server access based issue.

Any advice would be appreciated.

I believe that because your re detaching from central you’d need to do a save as instead of a save.

Hello Jacob,

I tried another Rhythm node, but it says the file already exists.
I am wanting to save them over the same file location once the upgrade is complete.

I tried a GeniusLoci node as well, but that doesn’t seem to work either.

Any ideas where to go from here?

Thanks,

Have you tried saving to a new path instead of trying to overwrite? Dynamo gets weird with sequencing background opened documents

1 Like

I have tried doing this but I am getting a message about work sharing.

Dynamo - Close  4

“The document just had worksharing enabled or was opened detached, so worksharingSaveAsOptions.SaveAsCentral must be set to true for save as”

Has anyone managed to save over the top of the previous locations directly? They need to go back in those positions at the end?

This video seems to show ABG doing exactly that? (Forgot to add it)

Thanks for the help,

Are you upgrading the files concurrently?

It appears you are saving to one drive, I am going to bet that is part of the issue if the files are not set to be “available offline”.

Honestly, for these kind of workflows I tend to work on a folder on my desktop directly, then I copy the files over to where they go. (in your case, onedrive)

3 Likes

I am attempting to yes. The idea is we have a parent models and all the revit links within it that need upgrading from one version of Revit to the other.

In the first definition (in the older version of Revit) I export to an excel file the paths of all links within the parent. In addition I was saving a copy of these files to an archive location.

In the second definition (this one) I attempt to detach these models, upgrade them, then save them as centrals back on top of where they were.

Hmm… if graph #1 already gathered the documents, opened the files and did a save as of each why do you need to open detached in graph #2? Unless I’m missing something Opening in the new version and saving the file should do the trick.

You might also be able to skip graph #2 if you have an existing and ongoing archive process in place, and then you can utilize the TransmissionData class of the Revit API to gather what you are after. This code is used in the ETranmit tool in Revit (which may be an effective alternative to part of the Dynamo workflow). I do not know of any packages which utilize it, so you would have to utilize Python or C# to develop some new tools, but it could cut your overall workload in half.

1 Like

+1 to John’s mention of working in a much more accessible location, whether it be Desktop or similar. OneDrive has introduced some level of complication here depending on the workflow, but it tends to be reliable for bulk processing versus gambling on server latency/stability. In that video tutorial I worked off Desktop for that reason also.

1 Like

“Hmm… if graph #1 already gathered the documents, opened the files and did a save as of each why do you need to open detached in graph #2? Unless I’m missing something Opening in the new version and saving the file should do the trick.”

I have them as separate graphs because the first one is there to find the links and copy them to an archived location in the original version (i.e Revit 2019). If I run the definition in Revit 2021 it tries to upgrade them first. I have attached the two definitions in case you wanted to take a look.

" you can utilize the TransmissionData class of the Revit API to gather what you are after. This code is used in the ETranmit tool in Revit (which may be an effective alternative to part of the Dynamo workflow). I do not know of any packages which utilize it, so you would have to utilize Python or C# to develop some new tools, but it could cut your overall workload in half."

I will have to look into what e-transmit can do for us as my programming skills for Python or C# aren’t up to scratch yet.

1 - bulkUpgradeProjects - Export Links to Excel.dyn (35.9 KB)
2 - bulkUpgradeProjects - Upgrade the Links from Excel.dyn (39.6 KB)

I seem to have it working by deleting the original links before trying to make central models in the original location.

So the process is something along of:

  1. Find the revit links (buildings) used in the master revit project (site)
  2. Copy a set of these files into an archived folder
  3. Delete the original files
  4. Upgrade the files from the archived folder and save them in the original link positions.

I ended up using a genius Loci node “Document SaveAs” because the Rhythm node seemed to have the problem before with this error message.

“The document just had worksharing enabled or was opened detached, so worksharingSaveAsOptions.SaveAsCentral must be set to true for save as”

I did detach the models earlier on in the definition though.

1 Like

Ah that makes sense now too. The save as option doesn’t have all the same options as the save on the Rhythm nodes. I added that logic to it as well.

For reference, when I made those nodes I had not thought of making them work on central models as that gets weird quick. But it should work once I push the latest update.

3 Likes