BBIM Spreadsheet Import/Export Material extraction
I successfully produced a CSV file with attributes from elements in the model
one thing I cannot figure out is how to get the name of material(s) assigned to the element
material.Name
suggested at https://blenderbim.org/docs-python/ifcopenshell-python/selector_syntax.html returns the Name of IfcMaterialProfileSetUsage
I understand there may be more than one material assigned to the profile or a particular type, any chance to extract the list of those or any material assigned independently? (I mean the materials showing in the Material Properties window), how about a list of all materials used in a project?
thanks in advance for your assistance
PS when I create a new material in Project Overview > Geometry > Materials, its name does not update in the drop-down list in Material Properties window, unless I save the IFC file and reload it. Cheers
Comments
See the attached files, as an example of different values exported around Materials. Open the .blend file first.
I don't think
material.item.0.Name
as outlined in the docs, is correct, as it doesn't return anything.I'm not sure there's a way to get a consolidated list of all the material names used in a project, in one column. Would like to be proved wrong, however.
@theoryshaw thanks a lot for your help, much appreciated
You're welcome.
Apparently you can get a list of materials used in the project...


Not sure, however, to add a column for a list of objects that use the material. Not sure that's possible.
@theoryshaw
putting together what you showed me is sufficient to organize it via Excel or Pandas
thanks again!
A little clarification is needed.
material.item.0.Name
literally gets the 0th "item" in the material set. This means layer, constituent, or profile. So it's not the name of a material... it's the name of the layer for example. Most layers are unnamed by default.Typically to get all the materials you should use the
materials
(notice thes
at the end) to get all materials assigned through various means. Somats.Name
is sufficient. This didn't work for IfcMaterialLists but that bug is now fixed.I've now added string concatenation support so it makes it nice and easy to format it nicely like
material1, material2
rather than["material1", "material2"]
.@Moult
thanks Dion!
Is there a syntax to export the IfcClassification, i.e. Uniclass details for a given selection of GlobalID's?

I don't think it did.

This PR proposes to add it. https://github.com/IfcOpenShell/IfcOpenShell/pull/3968
Hi @theoryshaw
please do you happen to know how to extract the profile value assigned to an element like column or similar? thx
Attached, open .blend file first.


Also, here's a video too, on how to 'navigate' the schema to see which values you could use.
thank you @theoryshaw
very informative video, cheers
I come here a lot to remember about materials...

so just added updated files