@Mostafa_El_Ayoubi, stop making the rest of us look bad!!!
I am New to Dynamo I canāt find the āDocument.BackgroundOpenā
From package Rhythm.
Also @Mostafa_El_Ayoubiās workflow is more complete an works with Dynamo player. Package data-shapes
Thatās actually more credit than I deserve ! @Mauro used Rhythm and Data-Shapes to create his workflow to batch upgrade files with a nice User Interface
Hey, John. Was just curious if you ever got a chance to investigate on errors with upgraded files and upgrading families. Thanks!
I have not unfortunately.
Do you think this could be adapted to reload a titleblock on multiple files?
Possibly, mind start a new topic and outlining your ideas?
I am on it!
@john_pierson Any way to modify this so that it saves the file as a central model? We are moving file servers and we have a bunch of Workshared models that will need to be resaved to the new location as central models.
I donāt see why not. It will just take some time, which I am a bit short on at the moment.
Can you point me in the right direction? I can get a python script that does a doc.SaveAs(path), but I donāt know the right syntax to add the SaveAsCentral option.
Thanks
Here is what I have so far I have been trying to just save the current document as central.
#import libraries and reference the RevitAPI and RevitAPIUI
import clr
import math
clr.AddReference(āRevitAPIā)
clr.AddReference(āRevitAPIUIā)
from Autodesk.Revit.DB import *
clr.AddReference(āRevitServicesā)
import RevitServices
from RevitServices.Persistence import DocumentManager
#set the active Revit application and document
doc = DocumentManager.Instance.CurrentDBDocument
path = doc.PathName
path1 = path.Replace(".rvt","_U.rvt")
doc.SaveAs(path1,WorksharingSaveAsOptions.SaveAsCentral)
But I get this error back when I run it
Warning: IronPythonEvaluator.EvaluateIronPythonScript operation failed.
Traceback (most recent call last):
File āā, line 17, in
TypeError: expected SaveAsOptions, got getset_descriptor
After banging my head against it for a while, I came up with a graph that works. It also filters out backups and files placed in a folder called āHistoryā
SaveAsCentralFilter.dyn (11.4 KB)
Save.ToCentral.dyf (6.6 KB)
Can you share the Excel file as well so we can see whatās going on with the code?
We will also be updating soon and i want to try this one.
Thank you for this code! I see in the āapplications.opendocumentsfileā node that it gives you the option to preserve worksets. How do I change this to discard worksets?