SergeySSH
SergeySSH

Reputation: 57

Design Automation for Revit; reduce time of WorkItem process

I prepared Design Automation application that exports set of views to DWG files. WorkItem contains json file that has a list of standard views to export, but to extend application I need to show user a list of the view that model has, so user can choose views to export.

Today I tested random 6Gb project to export 7 views.

Overall time for WorkItem process took about 50 mins report.txt

And just file opening took about 25 minutes, report.txt

In this case, if I want to show user a list of the views for export, I need a different WorkItem that collects all the floorplans from the model and return as a list, but user just can't wait for almost 1 hour to just get a list of views, or other elements.

Is there a way to work with Revit file without opening it, to get the data that doesn't required model rendering? Or keep file opened for some time to run the different WorkItems to avoid opening? Or any solution that will reduce time of WorkItem for files of this size and bigger?

Upvotes: 2

Views: 102

Answers (1)

Rahul Bhobe
Rahul Bhobe

Reputation: 4451

Keeping an active connection (sticky session) with a DA worker that has a Revit file opened just to access data from the file is possible, but will most likely be cost inefficient. You will end up paying for the idle time that no one wants to connect to that session. Also there is an issue of how many such active connections you can have as each file will take up one instance of a worker.

The best suggestion I have for this is to have another activity / app bundle that gives you the list of available views in a given model. Either run this activity periodically or upon update to the source Revit file to obtain the list of views in the model. Maintain the returned list of views in your database for all your models. This will allow you to present that list of views from your database to the user when they are browsing a given model.

There is a minor issue of data synchronization which may or may not be too critical depending on when your Revit model updates and when your view list extraction activity runs. If a user adds a view to the Revit model and expects that to be present in your UI right away, that may not happen. But it will be there eventually, so they need to be patient.

Upvotes: 0

Related Questions