All
I would like to know if it is possible to automate the creation and export of schedules in Revit.
That is to say this sequence of commands in Revit:
view, schedule, schedule/quants, filter list, category, ok, add all available fields, include other available fields like "rooms/spaces", ok. Export the schedule to excel.
I want to be able to do this for ALL possible schedules for the schedule/quantities view.
(I know we could do them all manually first and then import the views but this is not an option for this case).
Unfortunately the multi-category schedule leaves out a lot of data, hence we are exporting each in turn and then combining in a database. (I know one database to excel then to a database). If it were possible to export one database of every revit object and all there parameters that would be the ideal solution.
Dear Shaun,
Thank you for moving this query from your tweet to the discussion forum!
https://twitter.com/ShaunF1969/status/722017252564934661
Here is an overview of the Schedule API and a sample program showing how to access the schedule data:
http://thebuildingcoder.typepad.com/blog/2012/05/the-schedule-api-and-access-to-schedule-data.html
The sequence of commands I leave to you to explore.
Some steps can probably be driven through the official API. That is the best, safest and easiest approach.
If that is missing, you might be able to use PostCommand to launch the standard user interface command:
http://thebuildingcoder.typepad.com/blog/about-the-author.html#5.3
If that also fails, you can try using the Windows API and .NET UIAutomation library to simulate user input:
http://thebuildingcoder.typepad.com/blog/automation
I hope this helps.
Cheers,
Jeremy
My pleasure entirely, and the best of luck to you!
Cheers,
Jeremy