0

Where are Warnings in the Revit Database?

I'd like to use python to create my own error report (similar to the HTML export), but not sure where to find this information.

I cant find anything in the Revit API (Revit 2015) referring to warnings. How would i collect these?

I suspected that warnings might be a parameter of an element (such as groupid), but using revitsnoop - i'm coming up empty.

Skinner
  • 1,461
  • 4
  • 17
  • 27

2 Answers2

0

Sadly, not possible. Errors "happen" during opening, audits and other events. You can catch them sometimes, but not very cleanly. Jeremy Tammik has at least one blog post with a partial unsupported workaround.

Vote for my enhancement request on this topic: Revit Ideastation

Matt
  • 1,043
  • 5
  • 8
0

You can potentially catch all of the warnings yourself in the older versions of API by simply invoking the Warnings command in Revit. What will happen is that Revit will actually throw all of the warnings again so if you have setup a Preprocessor you will basically get a chance to catch them and export them to JSON/Excel or similar. It's not the best approach here, but it's a possible route. The only issue after that is will need to close the dialog that will appear after. Here's a link to a similar solution described by Matteo: http://teocomi.com/export-revit-warnings-list-from-api/

I do agree with Matt that officially the API is not there (not for R2015, support started in R2018 though) so this is a dirty hack.

konrad
  • 3,544
  • 4
  • 36
  • 75