Process a Revit error report (HTML file) and extract the error types, all affected elements and the total number of errors.
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:
An example on how to filter a specific type of error and fetch only its elements:
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
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.
Ah GitHub. How I don’t understand you. I need a Primer! 😉
Wonder if, instead of a set number of characters, you could look for everything past ID?
That’s another option, yes. I’ll give it a try.
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