I’ve found the following script on the web that will fetch the materialid of a list of Revit faces. However, it only excepts flat lists. I’d like to modify the code so it excepts nested lists. It would make my graph a lot simpler.
Anyone any ideas, or perhaps a similar script I could learn the strategy from?
import clr clr.AddReference("RevitServices") import RevitServices from RevitServices.Persistence import DocumentManager doc = DocumentManager.Instance.CurrentDBDocument faces = IN OUT = [doc.GetElement(f.MaterialElementId) for f in faces]