From dir open/save as central/reload all rvt links/stc and close file

Currently using Dynamo 2.0.1.

Here’s my thinking process and a bit of background info:
I am receiving files twice a week from our sub consultants that I have to replace the models within our network with their current files. Those files have REVIT links and in some cases 2D Autocad links. I have asked them to take the latest copies of their central files, and upload them to us so that we can then print internal progress and also contribute to our drawing indexes when we submit to client.
Here’s the problem.

  1. I have to manually copy and replace the files on our server, which of course, once the Subs sent us those files, we have to re-establish them as Central files on our network and reload the links within each of the files.
  2. This occurs twice a week.
  3. This is a huge project! 7000 sheets over 107 REVIT project files

Believe it or not I have automated most of this process except with this respect. I did some searching on here and found that there has been some new nodes and python scripting developed that addresses some of these very same issues,but I just cannot seem to either understand what’s going on or get this mapped properly to work.

I would like to build a script that in this order will process group of REVIT project files within a folder(s) in this manner:

  • Open broken central file document and save as proper central file at it’s current folder location.
  • Reload RVT links (which will reside in same folder).
  • Remove all Autocad links or imports.
  • Sync to Central.
  • Close document relinquishing everything.

Here’s the graph in pieces that I cannot seem to get put together to do this. The Clockwork and GENIUS LOCI nodes I can’t get my head around how or which one to use.
testing3.dyn (34.4 KB)
testing2.dyn (43.6 KB)

Hi @Dave_Vaughn,

It should be possible.
Your picture isn’t readable.
You can zoom into a single node and use the camera icon in the top right corner to capture your screenshot .

Wait…Can’t you click on the image and it opens in a new window? Or save image as?
It certainly worked for me!

Try it and you will see.
You should edit your post.

Yikes…so sorry!

This isn’t the place to post a macro.

It’s feasible in Dynamo with the help of Clockwork and Rhythm nodes.

The workflow is :
Detach the Revit document
Reload Revit Links
Delete CadLinks
Overwrite and save the Revit document
Relinquish
Close

You also need a strategy to select only the host files and not the linked documents because you can not have a linked file opened and reload it at the same time in the host file.

2 Likes

What version of dynamo are you running?

Dynamo 2.1 but it will also work in 1.3.3 and 2.0.

I couldn’t install the new package as I was running one of the stable cores…wouldn’t allow install of Loki latest.


I was able to get this to work btw, I just might have to make a few instances of the script to address naming issues

So I do not see where I am preserving previous worksets created when I do a detach…?

hmm…I tried the latest daily build…no go, instant crash.
I will reinstall the latest stable build and try again.

I’m quite sure you can install the latest version on Dynamo 2.0 as I can do it on Dynamo 1.3.3. when the message appears.
It will not work without the last update.

Well it won’t install on this version!

dynamo%20versions

You can also download it on https://dynamopackages.com/
And drop the folders in C:\Users\%USERNAME%\AppData\Roaming\Dynamo\Dynamo Revit\2.1\packages\Genius Loci

I have it loaded in 1.3.3.
So what about the issue with keeping worksets?

The node OpenDocumentFile from Rhythm package detach and preserve worksets so there is no issue.
Have you already tried it ?

Not sure how I would know that since I cannot edit the Rhythm node.
I am still understanding the process before I use it.
Thank you though so very much for all your help!

You’re welcome.
A good practice is to use a test file instead of a real project when trying a new graph.

This is what I came up with for processing multiple files using wildcards.

BATCH_PROCESS_SUB_FILES.dyn (15.0 KB)

2 Likes