ErrorReport.Parse


Process a Revit error report (HTML file) and extract the error types, all affected elements and the total number of errors.

Revit_2016-01-31_19-15-37.png

Inputs:

  • report: a file path to the location of the report
  • fetch_elements: a Boolean toggle (True by default). When true, the node will attempt to fetch the elements involved in each error. For this to be successful, the node must be executed from the Revit document that the report originated from. If the element does not exist any more, a null value will be returned instead. If you are executing from a different document (or from Sandbox mode), be sure to set “fetch_elements” to False. This will give you the ID of each element as a string for easy documentation.

Outputs:

  • error messages: all error messages in the report.
  • affected elements: the elements involved in each individual error.
  • unique errors: each type of error is listed here only once. Use this to filter in a specific type of error (and thus its elements).
  • number of errors: a count for each unique error type and the sum of all errors found in the report. Useful for documentation purposes.

The expected result when “fetch_elements” is set to False:

Revit_2016-01-31_19-16-12.png

An example on how to filter a specific type of error and fetch only its elements:

Revit_2016-01-31_20-05-28

Advertisement

6 thoughts on “ErrorReport.Parse

  1. I’m not getting all the errors listed in the HTML file I fed the node. The HTML file shows about 30, the node reports only the first 5. It seems to stop after a change in the view name. This is the first 6 lines of the error report. The definition stops at id 7182248. Thoughts?

    View “Section: Typ. Bldg. Section” : Dimensions : Linear Dimension Style : GEA-Standard.TP : id 7178797
    View “Section: Typ. Bldg. Section” : Dimensions : Linear Dimension Style : GEA-Standard.TP : id 7178798
    View “Section: Typ. Bldg. Section” : Dimensions : Linear Dimension Style : GEA-Standard.TP : id 7181956
    View “Section: Typ. Bldg. Section2” : Dimensions : Linear Dimension Style : GEA-Standard.TP : id 7182142
    View “Section: Typ. Bldg. Section2” : Dimensions : Linear Dimension Style : GEA-Standard.TP : id 7182248
    View “Floor Plan: EP.ELEV2.LVL2” : Dimensions : Linear Dimension Style : GEA-Standard TP 8 RND : id 11415315

    1. Hi Greg,
      It seems to be an error on my side. I assumed that Revit IDs are limited to only 7 digits, and as we can see from your report, they go up to 8. I’ll push out a new version of spring nodes later today that should have this corrected. By the way, if you experience any more issues in the future, please post them directly to the repository:
      https://github.com/dimven/SpringNodes/issues
      that way it’ll be easier for me to track them.

  2. I tried it in my French Revit, worked almost great,
    it only did not fetch the ID at first,
    if you change your code to look for ID in caps @ line 52 of your python script, it works then

Leave a Reply to Greg McDowell Jr Cancel reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.