bvn-architecture / revitbatchprocessor Goto Github PK
View Code? Open in Web Editor NEWFully automated batch processing of Revit files with your own Python or Dynamo task scripts!
License: GNU General Public License v3.0
Fully automated batch processing of Revit files with your own Python or Dynamo task scripts!
License: GNU General Public License v3.0
Hello, am trying to automate some of the task, and i get this error when i run my script,
error.txt
please help ! how can i optimise my script to run on RevitBatchProcessor, it works fine when run inside Dynamo
If two or more versions of Dynamo are installed for the same Revit version, the task script fails with exception:
System.IO.IOException: Could not add reference to assembly DynamoRevitDS
This is because in the case of two installed Dynamo versions, the DynamoRevitDS module is not loaded until the user selects a version to load in the version selector.
A solution would be to allow the user to specify which version of Dynamo to use for each version of Revit (where more than one Dynamo version is installed).
For the moment the user will have to only have one version of Dynamo installed for each Revit version.
Hi @DanRumery
I can't find RevitBatchAddin in my Revit 2019 after installing Installer for Revit Batch Processor v1.5.3.
Is it because i have 2 dynamo version 1.3.4 and 2.0.3?
Could you please assist on this.
Thanks & Best Regards,
The image at https://github.com/bvn-architecture/RevitBatchProcessor/blob/master/BatchRvt_Screenshot.png shows that it can be also used with Revit 2015. However, for 2015 Revit Files, the following error message appears: "ERROR: All specified Revit Files are of an unsupported version or have an unsupported file path."
See below the whole report:
19:21:10 :
19:21:10 : Session ID: <2018-04-17T18:21:10.431Z>
19:21:10 :
19:21:10 : Log File:
19:21:10 :
19:21:10 : C:\Users\alexberd\AppData\Local\BatchRvt\BatchRvt_20180417_192110_431.log
19:21:10 :
19:21:10 : Task Script:
19:21:10 :
19:21:10 : U:\Team\Dynamo Scripts\Main_9.dyn
19:21:10 :
19:21:10 : Show Message Box on Task Script Error is enabled.
19:21:10 :
19:21:10 : Revit Processing mode:
19:21:10 :
19:21:10 : Batch Revit File processing
19:21:10 :
19:21:10 : Reading Revit File list:
19:21:10 :
19:21:10 : U:\Team\212.10@Revit Batch Processor.txt
19:21:11 :
19:21:11 : WARNING: The following Revit Files are of an unsupported version (1):
19:21:11 :
19:21:11 : C:\test-XX-XX-M3-A-TEST2.rvt
19:21:11 : File exists: YES
19:21:11 : File size: 7.96MB
19:21:11 : Revit version: Autodesk Revit Architecture 2016 (Build: 20151007_0715(x64))
19:21:11 :
19:21:11 : ERROR: All specified Revit Files are of an unsupported version or have an unsupported file path.
19:21:11 :
19:21:11 : Operation aborted.
19:21:11 :
Any suggestion will be appreciated.
Kind regards,
Thank you for this project, this is the best for modifying multiple Revit files!
Revit mostly uses only one cpu core for the startup and dynamo, so (I think) it would really speed up the execution if the program could start a lot of Revit sessions concurrently, and process one file in one session, the next file in a new revit session, but don't wait for the previous session to finish.
Hi,
I am trying to run a C#/vb.net dll using RBP (in Revit 2018 and 2019). The dll is loaded and initialy the routine executes just fine when just passing 'doc' (doc = revit_script_util.GetScriptDocument()). No errors occur when only doc is used in my dll.
However if I also use 'uiapp' (uiapp = revit_script_util.GetUIApplication()) in my code to pass uiapp to uidocument (UIDocument uiDoc = uiapp.ActiveUIDocument;) I get an error: object not set to an instance of an object. Could uiapp be empty? Or is there another way to get uidocument directly?
I have also tried to modify the python script by adding:
uidoc = uiapp.ActiveUIDocument() but that results in another error: NoneType is not callable.
Am I missing something or could uiapp be emtpy/not found?
Can RevitBatchProcessor run cloud based models (BIM 360 Teams/Docs)?
When opening a BIM360 project options to Detach/Create Local are disabled (grayed out) on Cloud Based Models. If Cloud Models can be open via RevitBatchProcessor can it detach?
or do we need to access via local Collaboration Cache.
(C:\Users<user>\AppData\Local\Autodesk\Revit\Autodesk Revit 2018\CollaborationCache).
Thanks for your efforts. Such a powerful tool!
Thank you for this impressive utility.
I shared it on The Building Coder:
https://thebuildingcoder.typepad.com/blog/2019/11/the-revit-batch-processor-rbp.html
Questions:
Are the actions taken automatically logged? Why? In case of a problem, it might be handy to know how far you got successfully before the problem appeared, so that you know where to pick up again.
Is the Revit.exe health monitored? Why? Well, Revit is not built for batch processing, so one might expect it to crash and die if it is force fed too many files in a single session.
Is Revit restarted for each new document? That would reduce the risk of the aforementioned point.
Thank you!
Cheers,
Jeremy
I have a released revit addin, it could write some meta-info about rvt into external file. This addin also expose external command interface. According to the method of this link[https://thebuildingcoder.typepad.com/blog/2013/10/programmatic-custom-add-in-external-command-launch.html], I can successfully call this addin through PostCommand in C#, but after I port it into the python script, it cannot be called successfully. Is the method I used wrong? Or is the location of the call inappropriate?
Revit Halts when upgrading Revit 2017 to 2018 and the following message appears.
Unfortunately, the "OK" button is greyed out and application does not know to press "Delete Instances".
Would it be possible to first try to press "ok". If ok is greyed out, then try to press "Delete Instances".
I also snapped the screen when RevitBatchProcessor tries to avoid the error.
e.g. Opening Worksets dialog.
I receive the above error only when upgrading Revit 2017 Model to Revit 2018 by the use of Revit Batch Processor.
When upgrading the model by native Revit, it works fine!
20:46:13 : - Processing file (1 of 1): C:\test\MyProject\Revit_Model.rvt
20:46:13 : -
20:46:13 : - WARNING: the file being processed appears to be a Workshared Local file!
20:46:13 : -
20:46:13 : - Opening detached instance of central file: C:\test\MyProject\Revit_Model.rvt
20:46:15 : -
20:46:15 : - ERROR: Model is corrupt: The model could not be opened: Data in file an unnamed file is corrupt and needs to be manually recovered.
20:46:15 : - (CArchiveException 105)
20:46:15 : -
20:46:15 : - Exception: [Exception] The model could not be opened: Data in file an unnamed file is corrupt and needs to be manually recovered.
20:46:15 : - (CArchiveException 105)
20:46:15 : - .NET exception: [CorruptModelException] The model could not be opened: Data in file an unnamed file is corrupt and needs to be manually recovered.
20:46:15 : - (CArchiveException 105)
20:46:15 : -
20:46:15 : - Further exception information:
20:46:15 : -
20:46:15 : - OpenAndActivateDetachAndPreserveWorksets$100: 136: [163-163] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_file_util.py'
20:46:15 : - WithOpenedDetachedDocument$99: 186: [218-218] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_util.py'
20:46:15 : - revitAction$97: 55: [276-285] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_util.py'
20:46:16 : - WithDocumentOpeningErrorReporting$96: 61: [322-322] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_util.py'
20:46:16 : - action$95: 37: [315-315] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_util.py'
20:46:16 : - WithDialogBoxShowingHandler$94: 103: [88-88] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_dialog_util.py'
20:46:16 : - action$93: 38: [336-336] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_util.py'
20:46:16 : - WithFailuresProcessingHandler$91: 118: [172-172] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_failure_handling.py'
20:46:16 : - action$90: 49: [338-338] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_util.py'
20:46:16 : - WithExceptionLogging$89: 66: [153-153] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_util.py'
20:46:16 : - WithAutomatedErrorHandling$88: 66: [340-340] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_util.py'
20:46:16 : - WithErrorReportingAndHandling$87: 66: [317-317] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_util.py'
20:46:16 : - RunDetachedDocumentAction$86: 114: [287-287] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_util.py'
20:46:16 : - RunBatchTaskScript$63: 1550: [241-250] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_host.py'
20:46:16 : - <lambda$3>$62: 30: [347-347] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_host.py'
20:46:16 : - WithErrorHandling$25: 89: [49-49] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\script_host_error.py'
20:46:16 : - DoRevitSessionProcessing$46: 316: [346-351] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_host.py'
20:46:16 : - <lambda$4>$45: 36: [382-388] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_host.py'
20:46:16 : - WithErrorHandling$25: 89: [49-49] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\script_host_error.py'
20:46:16 : - outputStreamWriterAction$42: 66: [381-392] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_host.py'
20:46:16 : - UsingStream$39: 61: [84-84] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\stream_io_util.py'
20:46:16 : - outputStreamAction$40: 73: [395-395] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_host.py'
20:46:16 : - UsingStream$39: 61: [84-84] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\stream_io_util.py'
20:46:16 : - Main$26: 205: [398-398] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_host.py'
20:46:16 : - WithErrorHandling$25: 89: [49-49] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\script_host_error.py'
20:46:16 : - <unnamed>: 451: [410-414] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_host.py'
20:46:16 : -
20:46:16 : - Operation aborted.
20:46:16 : -
20:46:16 : - ERROR: An error occurred while processing the file!
20:46:16 : -
20:46:16 : - Exception: [Exception] The model could not be opened: Data in file an unnamed file is corrupt and needs to be manually recovered.
20:46:16 : - (CArchiveException 105)
20:46:16 : - .NET exception: [CorruptModelException] The model could not be opened: Data in file an unnamed file is corrupt and needs to be manually recovered.
20:46:16 : - (CArchiveException 105)
20:46:16 : -
20:46:16 : - Further exception information:
20:46:16 : -
20:46:16 : - OpenAndActivateDetachAndPreserveWorksets$100: 136: [163-163] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_file_util.py'
20:46:16 : - WithOpenedDetachedDocument$99: 186: [218-218] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_util.py'
20:46:16 : - revitAction$97: 55: [276-285] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_util.py'
20:46:16 : - WithDocumentOpeningErrorReporting$96: 61: [322-322] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_util.py'
20:46:16 : - action$95: 37: [315-315] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_util.py'
20:46:16 : - WithDialogBoxShowingHandler$94: 103: [88-88] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_dialog_util.py'
20:46:17 : - action$93: 38: [336-336] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_util.py'
20:46:17 : - WithFailuresProcessingHandler$91: 118: [172-172] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_failure_handling.py'
20:46:17 : - action$90: 49: [338-338] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_util.py'
20:46:17 : - WithExceptionLogging$89: 66: [153-153] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_util.py'
20:46:17 : - WithAutomatedErrorHandling$88: 66: [340-340] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_util.py'
20:46:17 : - WithErrorReportingAndHandling$87: 66: [317-317] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_util.py'
20:46:17 : - RunDetachedDocumentAction$86: 114: [287-287] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_util.py'
20:46:17 : - RunBatchTaskScript$63: 1550: [241-250] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_host.py'
20:46:17 : - <lambda$3>$62: 30: [347-347] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_host.py'
20:46:17 : - WithErrorHandling$25: 89: [49-49] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\script_host_error.py'
20:46:17 : - DoRevitSessionProcessing$46: 316: [346-351] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_host.py'
20:46:17 : - <lambda$4>$45: 36: [382-388] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_host.py'
20:46:17 : - WithErrorHandling$25: 89: [49-49] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\script_host_error.py'
20:46:17 : - outputStreamWriterAction$42: 66: [381-392] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_host.py'
20:46:17 : - UsingStream$39: 61: [84-84] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\stream_io_util.py'
20:46:17 : - outputStreamAction$40: 73: [395-395] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_host.py'
20:46:17 : - UsingStream$39: 61: [84-84] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\stream_io_util.py'
20:46:17 : - Main$26: 205: [398-398] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_host.py'
20:46:17 : - WithErrorHandling$25: 89: [49-49] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\script_host_error.py'
20:46:17 : - <unnamed>: 451: [410-414] 'C:\Users\user\AppData\Local\RevitBatchProcessor\Scripts\revit_script_host.py'
20:46:26 :
20:46:26 : Revit process (PID: 11888) has exited!
20:46:26 :
20:46:26 : Operation completed.
20:46:26 :
20:46:26 :
20:46:26 : A plain-text copy of the Log File has been saved to:
20:46:26 :
20:46:26 : C:\Users\user\AppData\Local\BatchRvt\BatchRvt_20190429_204558_294.txt
20:46:26 :
I also checked the journals and found the following lines at the end of the journal file.
'ApplicationException is being thrown on behalf of the function <class ESEntity __cdecl Element::getEntity(class ESSchema *) const>. Dump file: C:\Users\user\AppData\Local\Autodesk\Revit\Autodesk Revit 2018\Journals\journal.0823.0001.dmp: line 1748 of d:\ship\2018_px64\source\revit\revitdb\gensrc\Element.gen.cpp.
' 8:< ::38:: Delta VM: Avail -79 -> 134211231 MB, Used +62 -> 496 MB, Peak +72 -> 506 MB; RAM: Avail -49 -> 50368 MB, Used +80 -> 658 MB, Peak +89 -> 668 MB
' 8:< GUI Resource Usage GDI: Avail 9817, Used 183, User: Used 231
' 8:< An ArchiveException 105 is raised at line 112 of Tasks\ExceptionCache.cpp: ExceptionCache::propagateExceptions: cached fatal exceptions
' 8:< Failed to load elemStream#0
' 3.221626========= 8:<<<loadLatestVersion
' 3.221732======== 7:<<loadSelectedEpochs
' 6:< ::38:: Delta VM: Avail -29 -> 134211203 MB, Used 496 MB; RAM: Avail -2 -> 50367 MB, Used +1 -> 660 MB
' 6:< GUI Resource Usage GDI: Avail 9818, Used 182, User: Used 231
' 6:< Before : Destroy Display Manager
' 6:< System (MB) [Available / Total ] [Revit Memory Usage (MB) ]
' 6:< RAM Statistics: 50366 / 65212 660=InUse 668=Peak
' 6:< VM Statistics: 134211203 / 134217727 496=InUse 506=Peak
' 6:< After : Destroy Display Manager
' 6:< System (MB) [Available / Total ] [Revit Memory Usage (MB) ]
' 6:< RAM Statistics: 50366 / 65212 660=InUse 668=Peak
' 6:< VM Statistics: 134211203 / 134217727 496=InUse 506=Peak
' 3.325103======= 6:<<TrustedUtility::readStreams
'C 29-Apr-2019 20:46:15.461; 5:< Your model is being upgraded
'C 29-Apr-2019 20:46:15.461; 5:< Autodesk Revit 2017
'C 29-Apr-2019 20:46:15.461; 5:< Autodesk Revit 2018
'C 29-Apr-2019 20:46:15.461; 5:< It is a local copy of a workshared project. After the upgrade changes are saved, you will no longer be able to synchronize the local copy with the central model.
' 3.916738===== 4:<<loadSerialize/ALL_GAPS 0.591635/TurnOff_GAPs 100%
' 3:< SLOG $f08d4c97 2019-04-29 20:46:15.470 <Open:Local
' 3:< SLOG $f08d4c97 2019-04-29 20:46:15.481 <Open
' 3:< SLOG $f08d4c97 2019-04-29 20:46:15.492 <Session
' 3.953744==== 3:<<LoadFromStorage
' 3:< ::38:: Delta VM: Avail +20 -> 134211223 MB, Used 496 MB; RAM: Avail +4 -> 50371 MB, Used -5 -> 655 MB
' 3:< GUI Resource Usage GDI: Avail 9818, Used 182, User: Used 226
' 3:< DummyStorage destroying DataStorageInterface 0x00000207EF20D6B0
' 3:< Connecting session [$46b3dba8] to Worksharing Log [C:\Users\user\AppData\Local\Autodesk\Revit\Autodesk Revit 2018\Journals\journal.0823.txt]
' 3:< Additional IP address/name found for host 0673-WEA: 10.0.33.83
' 3.958765=== 2:<<FormOrAbandon::openFromModelPath [C:\test\MyProject\Revit_Model.rvt]
' 2:< API_ERROR { System.NullReferenceException exception(Object reference not set to an instance of an object.) was thrown from a handler of Autodesk.Revit.Proxy.DB.Events.DocumentOpenedEventArgsProxy event. The API event handler was registered by application CoordinationModelDB (c9463641-1c02-431c-9502-4ad0c91de1ce). Changes made by this handler are going to be discarded. }
' 2:< API_ERROR { System.NullReferenceException exception(Object reference not set to an instance of an object.) was thrown from a handler of Autodesk.Revit.Proxy.DB.Events.DocumentOpenedEventArgsProxy event. The API event handler was registered by application Unifi Revit 2018 AddIn (ff41c9d1-c8bc-4728-80ac-fb715dab6443). Changes made by this handler are going to be discarded. }
' 4.022115== 1:<<[Cloud]standardOpenDocumentFile
' 0:< API_SUCCESS { Unregistering DialogBoxShowing event by application BatchRvtAddin (b57d22c8-5e1f-407a-86ea-a8615fd8df34). }
' 0:< API_SUCCESS { Unregistering FailuresProcessing event by application BatchRvtAddin (b57d22c8-5e1f-407a-86ea-a8615fd8df34). }
I don't really understand the "d:\ship\2018_px64\source\revit\revitdb\gensrc\Element.gen.cpp" part of it.
Would be really grateful if you could provide any help.
Regards.
Hi,
Thanks for all your effort on the developing this tool and made it publicly available. A large number of people can get benefit from this tool.
I have successfully installed this tool and can see this working well except this tool does not save the RVT file before it closes. Do we have to use another script to save the current document? It would be great to have option in the UI to allow user to save on the current location or save as in the different location. Any help will be appreciated.
Best regards,
Dhanjeet
I am trying to use this tool to iterate a dynamo script through many models with one click. I keep getting the error message: "Could not determine the Run mode of this Dynamo script!" I have tried starting brand new project and brand new graphs. I have made sure I only have one version of dynamo installed. What else am I missing? I am trying to convert my simple graph into designscript so maybe if I can get some help doing that I could bypass needing to run via Dynamo. I will attach where I am with the script. Thanks to anyone who can help!
On non-English Windows installations(not Revit), Windows replaces the buttons on the save file dialog to the language's counterparts. My Windows is installed in Hungarian, and on the Save file dialog Yes/No/Cancel is replaced by Igen/Nem/Mégse:
When I forget to add handling of saving/closing the Revit file to the dynamo script, RBP just hangs, and the following shows up in the log:
19:13:38 : 'Save File' dialog box detected.
19:13:38 :
19:13:38 : WARNING: Could not find suitable button to click for 'Save File' dialog box!
19:13:38 :
19:13:38 : Button: 'Igen'
19:13:38 :
19:13:38 : Button: 'Nem'
19:13:38 :
19:13:38 : Button: 'M‚gse'
My feature request/question is: is it possible to modify the "suitable button"?
Edit:
I guess this issue is somewhat related to #10 . So maybe this just a head's up, so please add support for non-english languages when you work on the saving methods. Thank you for your work again!
Re: question from @walid-el on issue #18
It depend what you mean by that. Currently RBP handles most (if not all?) dialog boxes automatically. In many cases it defaults to 'no' but in some cases 'yes' is required so it chooses yes. There are many types of dialog boxes that may be displayed during processing so my question is, how might an option like this work? Would it be 'choose 'yes' for specific dialog with title? Or something else?
If a Revit instance is already open (not through RBP) with one of the files in the list, RBP is not able to find the Revit Version.
13:41:08 : Reading Revit File list:
13:41:08 :
13:41:08 : C:\Users\xxx\Desktop\list.csv
13:41:08 :
13:41:08 : WARNING: The following Revit Files are of an unsupported version (1):
13:41:08 :
13:41:08 : xxx\Multiple_Doors.rvt
13:41:08 : File exists: YES
13:41:08 : File size: 55.65MB
13:41:08 : Revit version: NOT DETECTED!
13:41:08 :
13:41:08 : ERROR: All specified Revit Files are of an unsupported version or have an unsupported file path.
13:41:08 :
13:41:08 : Operation aborted.
Normally when the same file is opened twice on different Revit instances (same computer), a dialog box will pop up saying
I would say it's a separate issue if the file should actually be processed or not (if the script asks to save the file, that wouldn't be possible since it's read only) -- but regardless the error message for this specific case should be more specific. The script didn't fail because it couldn't find the Revit verison, it failed because the Revit file is already open.
Side note: I can have the same version Revit open (with a different file open) with no issue -- this is only the case if one of the listed files is already open in Revit.
I need to do some complicated operations on Revit. I want to do it manually, then find the journal txt generated by revit, and then run the journal txt on your revitBatchProcessor to batch process the model files to achieve the same model processing
I'm looking at contributing to this project, but I'm a bit confused on where the excel file is processed. The only references I found to Microsoft Office dlls are in excel_util.py
, but I'm not sure how that plays into the larger script.
Overall goal was to additionally support .csv
input as well, so I was going to try to use a similar model to how .xlsx
and .txt
files are processed now.
Additionally, it would be helpful for a "Getting Started" section for Contributors. I'll be able to help out on that once I figure it out myself :)
Revit Batch Processor opens the file, runs the dynamo script and then closes Revit. During closing, Revit halts giving the error "Autodesk Revit has stopped working" and the following dialog box appears asking me to close or to debug it.
Unfortunately we cannot debug Revit as we don't have the PDB files. Refer also to few links below, this seems to be a common Revit issue.
https://forums.autodesk.com/t5/revit-api-forum/revit-crash-in-utility-dll-when-using-external-event/td-p/7111076
https://forums.autodesk.com/t5/revit-architecture-forum/revit-crashing-when-closing-model-file-ntdll-dll-errors/td-p/6573162
Would it be possible to modify Revit Batch processor to send an "ALT+C" command when this message appears? This will allow to automatically click the "close program" button and to continue the process without manual input from the user.
This will be truly beneficial having let us use Revit Batch Processor uninterrupted in multiple files.
Many thanks.
Alexandros
The command-line option for auditing (--audit) has no effect.
(Audit does work in the GUI and in the settings file, however.)
When the Windows display setting is set to > 100% (for fonts) then the Revit Batch Processor GUI window is too small show all window controls.
Hi Dan,
Thanks a lot for this awesome tool!
I stumbled upon an issue with Revit 2020.2.2, please find below the scenarios I used for testing and the recurrent output I get.
Do you have any idea of what may be happening?
Testing scenarios applied include all combinations of the following aspects:
The output below occurs consistently ONLY when using Revit 2020.2.2
04/06/2020 16:03:47 : Monitoring host Revit process (PID: 20636)
04/06/2020 16:03:47 :
04/06/2020 16:03:53 : - [ REVIT ERROR MESSAGE ] : [0604/160352.360:ERROR:gpu_process_transport_factory.cc(1029)] Lost UI shared context.
04/06/2020 16:03:53 : - [ REVIT ERROR MESSAGE ] :
04/06/2020 16:03:53 : - [ REVIT ERROR MESSAGE ] : DevTools listening on ws://127.0.0.1:8088/devtools/browser/451563491-3449-483d-bfc5-81d368d409a3s3322
04/06/2020 16:04:24 : -
04/06/2020 16:04:25 : - ERROR: An error occurred while processing the file!
04/06/2020 16:04:25 : -
04/06/2020 16:04:25 : - Exception: [AttributeError] 'BasicFileInfo' object has no attribute 'SavedInVersion'
04/06/2020 16:04:25 : - .NET exception: [MissingMemberException] 'BasicFileInfo' object has no attribute 'SavedInVersion'
04/06/2020 16:04:25 : -
04/06/2020 16:04:25 : - Further exception information:
04/06/2020 16:04:25 : -
04/06/2020 16:04:25 : - GetRevitFileVersion$96: 51: [289-289] 'C:\Users\Jose\AppData\Local\RevitBatchProcessor\Scripts\revit_file_util.py'
04/06/2020 16:04:25 : - GetSnapshotData$83: 175: [48-48] 'C:\Users\Jose\AppData\Local\RevitBatchProcessor\Scripts\snapshot_data_exporter.py'
04/06/2020 16:04:25 : - ExportSnapshotDataInternal$82: 110: [92-100] 'C:\Users\Jose\AppData\Local\RevitBatchProcessor\Scripts\snapshot_data_exporter.py'
04/06/2020 16:04:25 : - ExportTemporarySnapshotData$80: 91: [135-144] 'C:\Users\Jose\AppData\Local\RevitBatchProcessor\Scripts\snapshot_data_exporter.py'
04/06/2020 16:04:25 : - RunBatchTaskScript$63: 490: [137-145] 'C:\Users\Jose\AppData\Local\RevitBatchProcessor\Scripts\revit_script_host.py'
04/06/2020 16:04:25 : - <lambda$3>$62: 30: [347-347] 'C:\Users\Jose\AppData\Local\RevitBatchProcessor\Scripts\revit_script_host.py'
04/06/2020 16:04:25 : - WithErrorHandling$25: 89: [49-49] 'C:\Users\Jose\AppData\Local\RevitBatchProcessor\Scripts\script_host_error.py'
04/06/2020 16:04:25 : - DoRevitSessionProcessing$46: 316: [346-351] 'C:\Users\Jose\AppData\Local\RevitBatchProcessor\Scripts\revit_script_host.py'
04/06/2020 16:04:25 : - <lambda$4>$45: 36: [382-388] 'C:\Users\Jose\AppData\Local\RevitBatchProcessor\Scripts\revit_script_host.py'
04/06/2020 16:04:25 : - WithErrorHandling$25: 89: [49-49] 'C:\Users\Jose\AppData\Local\RevitBatchProcessor\Scripts\script_host_error.py'
04/06/2020 16:04:25 : - outputStreamWriterAction$42: 66: [381-392] 'C:\Users\Jose\AppData\Local\RevitBatchProcessor\Scripts\revit_script_host.py'
04/06/2020 16:04:25 : - UsingStream$39: 61: [84-84] 'C:\Users\Jose\AppData\Local\RevitBatchProcessor\Scripts\stream_io_util.py'
04/06/2020 16:04:25 : - outputStreamAction$40: 73: [395-395] 'C:\Users\Jose\AppData\Local\RevitBatchProcessor\Scripts\revit_script_host.py'
04/06/2020 16:04:25 : - UsingStream$39: 61: [84-84] 'C:\Users\Jose\AppData\Local\RevitBatchProcessor\Scripts\stream_io_util.py'
04/06/2020 16:04:25 : - Main$26: 205: [398-398] 'C:\Users\Jose\AppData\Local\RevitBatchProcessor\Scripts\revit_script_host.py'
04/06/2020 16:04:25 : - WithErrorHandling$25: 89: [49-49] 'C:\Users\Jose\AppData\Local\RevitBatchProcessor\Scripts\script_host_error.py'
04/06/2020 16:04:25 : - : 451: [410-414] 'C:\Users\Jose\AppData\Local\RevitBatchProcessor\Scripts\revit_script_host.py'
04/06/2020 16:04:35 :
04/06/2020 16:04:35 : Revit process (PID: 20636) has exited!
Thanks in advance!
It seems that Dynamo will not automatically execute a script whose 'HasRunWithoutCrash' XML attribute is set to 'False'.
For the time being the workaround is to change the 'HasRunWithoutCrash' attribute value to 'True' in the offending script.
A few of my scripts have some variables that were given by the user as a form input. I want to automate the task, but still enable the user to be able to provide those custom settings.
Off the top of my head, I think the easiest way to do this would be allowing the user to add additional columns in their file list. The python script the user writes (sorry, not sure how Dynamo would work) could reference an import that RBP creates and exports with the python file. Another option would be to do this in conjunction with #36 that manages communication between all of the processes as well.
Example:
CSV file
path | type |
---|---|
filepath\Multiple_Doors.rvt | doors |
Python script
import clr
import System
clr.AddReference("System.Core")
clr.ImportExtensions(System.Linq)
clr.AddReference("RevitAPI")
clr.AddReference("RevitAPIUI")
from Autodesk.Revit.DB import *
import revit_script_util
from revit_script_util import Output
# Typical things copied from template
revitFilePath = revit_script_util.GetRevitFilePath()
# TODO: some real work!
Output()
Output("This task script is running!")
# Custom part for issue 43 example
from file_settings import file_settings
settings = file_settings[revitFilePath] # Get the settings for the specific document based on the file path
if settings['type'] == 'door':
TaskDialog.Show('Revit', 'Door type selected')
file_settings.py (created by RBP when it parsed the CSV)
settings = {
'filepath\\Multiple_Doors.rvt': {
'type': 'door'
}
}
I can see in your UI that you can run python scripts and dynamos but C# Revit addins are missing, will it be added in the future or do I have to translate to python my existing C# scripts ?
Thanks !
The UI looks a bit too busy with too many features on display. Some of these features are rarely used so should be hidden away under an Advanced Settings option.
Add the ability to configure the per-file processing time-out in the GUI. Currently this is only configurable via an exported/imported settings file (under property processingTimeOutInMinutes
).
Hi,
Is there a way to run vb.net dll instead of c# dll? I have some routines in different coding and I would like to run them both.
regards,
Raymond
Hi there
20:40:02 : - ERROR: An error occurred while executing the task script! Operation aborted.
20:40:02 : -
20:40:02 : - Exception: [SyntaxError]
20:40:02 : - Could not obtain further exception information.
I am not so good in python and probably did something wrong. Could you please check where am I wrong?
DS.py.txt
Regards,
Sergey
Originally posted by @s-fad in #10 (comment)
I select 'Use same Revit session' but after processing one file Revit closes, and the new file processed in a new session.
I expected that using this option Revit won't close after processing one file but open the new file in the same session, or am I misunderstanding this option?
I found this bug running a dynamo script on Revit 2016
Around the beginning of the log file it says:
21. 05. 2019 18:05:49 : Revit Processing mode:
21. 05. 2019 18:05:49 :
21. 05. 2019 18:05:49 : Batch Revit File processing
@DanRumery it would very useful to export log file, and is there a anyway to have a option that handles revit dialog box with yes or no ?
I can start revit under proxy settings without problem, but when I start with RevitBatchProcessor I received errors below :
seems those proxy settings cannot pass through and my account was locked afterthat
10:48:27 : - [ REVIT ERROR MESSAGE ] : [0304/104824.964:VERBOSE1:pref_proxy_config_tracker_impl.cc(151)] 00000000550B9E00: set chrome proxy config service to 00000000550BA120
10:48:27 : - [ REVIT ERROR MESSAGE ] : [0304/104824.964:VERBOSE1:pref_proxy_config_tracker_impl.cc(278)] 00000000550B9E00: Done pushing proxy to UpdateProxyConfig
10:48:27 : - [ REVIT ERROR MESSAGE ] : [0304/104824.965:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Google 'Pilot' log
10:48:27 : - [ REVIT ERROR MESSAGE ] : [0304/104824.965:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Google 'Aviator' log
10:48:27 : - [ REVIT ERROR MESSAGE ] : [0304/104824.965:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: DigiCert Log Server
10:48:27 : - [ REVIT ERROR MESSAGE ] : [0304/104824.965:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Google 'Rocketeer' log
10:48:27 : - [ REVIT ERROR MESSAGE ] : [0304/104824.965:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Symantec log
10:48:27 : - [ REVIT ERROR MESSAGE ] : [0304/104824.965:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Venafi log
10:48:27 : - [ REVIT ERROR MESSAGE ] : [0304/104824.965:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Symantec 'Vega' log
10:48:27 : - [ REVIT ERROR MESSAGE ] : [0304/104824.966:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: CNNIC CT log
10:48:27 : - [ REVIT ERROR MESSAGE ] : [0304/104824.966:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: WoSign log
10:48:27 : - [ REVIT ERROR MESSAGE ] : [0304/104824.966:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: StartCom CT log
10:48:27 : - [ REVIT ERROR MESSAGE ] : [0304/104824.966:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Google 'Skydiver' log
10:48:27 : - [ REVIT ERROR MESSAGE ] : [0304/104824.966:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Google 'Icarus' log
10:48:27 : - [ REVIT ERROR MESSAGE ] : [0304/104824.966:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Izenpe log
10:48:27 : - [ REVIT ERROR MESSAGE ] : [0304/104824.966:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Certly.IO log
I have several inputs within a Dynamo script that I would typically utilize data-shapes for. It provides a drop-down menu where users can select different inputs before running the Dynamo script. Now that I am using Revit Batch Processor, the drop-down menu appears after each revit file that opens. Is there a way I can batch the inputs of my dynamo script without having to enter in the data each time a Revit document opens?
Hi,
Cab RevitBatchProcessor run Revit Server based models?
We are using Revit Server to be able to open the central models on two different office locations. I would like to open and detach from Revit server before starting any operations instead of the local copy of the worksharing model.
Thanks for your effort!
Hi, thank you for the excellent work here.
I have an issue with using CLI commands: I feed a path as an argument, but Batchrvt.exe returns an error "the given path format is not supported" or similar. it just goes too fast so I can really read it.
Path is something like: "C:\Users\Julien\Dropbox\10-XXXXXXX\BatchRvt.Settings.json"
I did this because the json file for settings is not in the Default location.
when I use the default, it works great. any clue?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.