Batch synchronize with central file using Rhythm or Clockwork

Hi, all again,

I’m still working on my graph on Dynamo, and I come up with another issue.
I’m trying to bring further this batch auditing process and bring it also for central models.

Using the “Application.CloseDocument” node from “Rhythm” package, I’ve seen that is saving the file, but this function only applies on not work-shared files.

I searched a node that can help me, and I found “Document.SynchronizeWithCentral” in “Clockwork” package.
It seems useful because it gives you the chance to decide which elements to relinquish, to save the local file before and after and to add a comment to the synchronising process.
Here the problem is that the node is synchronising only the opened project and has not an input for the file list coming from “Application.OpenDocumentFile” Rhythm node.

I’m asking you is there is a way to upgrade the Clockwork (or the Rhythm one) node to accept a list of local files for synchronising on each central model.

Thank you for your time and help guys

EDIT: I’ll post here the related Revit API webpage about Syncronize

http://www.revitapidocs.com/2018.1/7de73a7b-68f0-87f2-f6a9-97d824024877.htm

A simpler solution might be to build a custom node from the clockwork and rhythm nodes. This would allow for easy list processing. Basically every node after the initial directory input node would work in sequence for a single file this way. Feeding it a list would iterate each function in sequence over the whole list too.

1 Like

Thank you for your reply, @jacob.small

I thought about that solution but at the moment I can’t access the code of neither “Application.OpenDocumentFile” and “Application.CloseDocument” nodes from Rhythm.

Double-clicking on the node is not working as on the “Document.SynchronizeWithCentral” from Clockwork.
In fact graphics between the nodes is not the same.

Any help?

@john_pierson

Place the nodes from rhythm in your custom node?

The SynchronizeWithCentral requires the Document to complete. I’m making a quick assumption, but by getting the CurrentDocument would be the parent file that you are running on, not the child file that you are calling to complete the action. So, you would need to modify his node to include a “Document” slot, pass in your child Document to complete the task. Even then, I don’t know if that will work.

Some light reading:

And my variation with a large amount of edits:

There is also two nodes in there for handling SwC transaction. I was having difficulties running Andreas’s node out of Clockwork. I replaced with Lightning’s node and have been having a lot more success. Also, even in my custom package, I don’t have a slot to pass in a Document, that’s why you have to step outside the scope of the Revit Document.

These are all just random thoughts and may not actually be the problem. :slight_smile:

Did you get this to work? I’m looking to do a similar thing and would love to see a working script. Also, are you using Dynamo Sandbox? If so, how did you download the packages that refer to Revit API in Sandbox like Rhythm?

Dynamo cannot access the Revit API outside of the Dynamo for Revit environment. This is a limitation of Revit which isn’t avoidable.

1 Like