Does anyone have any suggestions on how to replace the empty lists with a constant value?
What I’m trying to do with this script is the following:
1 - grab some Revit geometry (easy)
2 - explode it to its faces (easy)
3 - grab the material from each face (some python needed)
4 - then combine all the faces with the same material in one object (easy…as long as the list from 2 and 3 are the same length!)
5 - write a separate .sat export for each unique material. (easy)
In the end, I would bring in each .sat separately in Formit. Because each .sat is grouped on import, I would have an easier time reassigning the materials.
However, I got stuck at step 3.
When I convert the Dynamosurfaces to Revitfaces (using the Revitface.FromDynamoSurface node), I sometimes get an “empty list” as result.
The problem is, I can’t just drop the emptylists as I want to combine the list from step 2 (geometry) with the list from step 3 (materials) and they need to be the same length for that to work properly.
Anyone any idea how to replace nested “empty lists” with something else?