S
by steverugi on 29 Oct 2023, edited 21 Nov 2023
#
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
T
by theoryshaw on 29 Oct 2023, edited 29 Oct 2023
#
+1 votes
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.


S
by steverugi on 29 Oct 2023
#
@theoryshaw thanks a lot for your help, much appreciated
T
by theoryshaw on 29 Oct 2023
#
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.
S
by steverugi on 29 Oct 2023
#
@theoryshaw
Not sure, however, to add a column for a list of objects that use the material. Not sure that's possible.
putting together what you showed me is sufficient to organize it via Excel or Pandas
thanks again!
M
by Moult on 1 Nov 2023, edited 1 Nov 2023
#
+2 votes
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 the s
at the end) to get all materials assigned through various means. So mats.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"]
.
T
by TransportBIM on 5 Nov 2023
#
Is there a syntax to export the IfcClassification, i.e. Uniclass details for a given selection of GlobalID's?

T
by theoryshaw on 5 Nov 2023
#
+1 votes
I don't think it did.
This PR proposes to add it. https://github.com/IfcOpenShell/IfcOpenShell/pull/3968


S
by steverugi on 8 Nov 2023
#
Hi @theoryshaw
please do you happen to know how to extract the profile value assigned to an element like column or similar? thx
T
by theoryshaw on 8 Nov 2023
#
+2 votes
Attached, open .blend file first.


Also, here's a video too, on how to 'navigate' the schema to see which values you could use.
S
by steverugi on 8 Nov 2023
#
thank you @theoryshaw
Also, here's a video too, on how to 'navigate' the schema to see which values you could use.
very informative video, cheers
T
by theoryshaw on 21 Nov 2023
#
+1 votes
I come here a lot to remember about materials...
so just added updated files
