Warnings from linked models

I have no experience with Bang but how would you want the node to output the warnings? From here, you can see everything that can be extracted from a warning, including the description text and the element Id.

Going off the method @john_pierson gave and the linked doc collector from this thread Revit link elements, courtesy of @cgartland, this python code will give you a list of warnings with their respective elementid from all of the linked docs.

import clr
clr.AddReference('RevitAPI')
clr.AddReference('RevitServices')

from Autodesk.Revit.DB import *
from RevitServices.Persistence import DocumentManager

current_doc = DocumentManager.Instance.CurrentDBDocument
links = FilteredElementCollector(current_doc).OfClass(RevitLinkInstance)
docs = [link.GetLinkDocument() for link in links]

all_warnings = []
for doc in docs:
	warns = doc.GetWarnings()
	warnings = []
	for warn in warns:
		elems = []
		warnings.append(warn.GetDescriptionText())
		for elem in warn.GetFailingElements():
			elems.append(doc.GetElement(elem))
		warnings.append(elems)
	all_warnings.append(warnings)


OUT = all_warnings

Let me know what you would want added to the list.
Edit: updated to return the actual element instead of elementid

linkedwarnings

8 Likes