Solved

How to read custom IFC properties

  • 5 September 2018
  • 8 replies
  • 37 views

Hello,

I could use some help with accessing custom IFC properties (and their values) in the FME workbench (version 2018.1.0.0).

I am working on a transformation from an IFC file to PostGIS. The IFC file contains custom properties for some classes (e.g. IfcBuilding and IfcSpace). I can see those custom properties and their values when I inspect the IFC file with an IFC viewer. I can also see the values of the custom properties when I open the IFC file in the FME Data Inspector when I set the "Data Model" parameter of the reader to "Hierarchical". Only in that case I can't tell which IFC class instance the value belongs to.

 

 

From reading related question and answers I have understood that in order to expose custom IFC properties I would need to add a Attribute Exposer transformer. I tried several settings for the IFC reader parameters, and I have tried specifying additional attributes in the AttributesExposer, in the format <name of the IFC property set>.<name of the IFC property>, but I have not been able to get the property values written to the output.

 

 

So my questions are:

 

1) Are there settings for the IFC Reader parameters that allow or block reading custom IFC properties?

 

2) Is it correct that the Attribute Exposer is the (only/preferred) way to access the values of custom IFC properties?

 

3) In which format should custom IFC properties be added to the AttributeExposer?

 

 

Thanks!

 

Frans
icon

Best answer by daveatsafe 6 September 2018, 01:41

View original

8 replies

Userlevel 2
Badge +17

Hi @fransknibbe,

The Property Set information in the IFC file is stored as traits in the geometry hierarchy, rather than as feature attributes. To promote the properties to attributes, please use a GeometryPropertyExtractor transformer.

Leave 'Trait to Extract' blank to extract all the traits, but set 'Prefix Extracted Trait with Geometry Name' to yes. This will prefix each property with the property set name. This transformer will not expose the new attribute to Workbench, so you will need to add an AttributeExposer. You can use an Inspector transformer to view the features and the new attributes.

Alternatively, you could use the Revit reader, with the 'Building Elements with Hierarchy' data view to read the IFC file. The data views automatically do the property extraction, and simplify the geometry for better conversion to GIS. The Revit reader defaults to a .rvz file (which is basically a zipped IFC), but can read .ifc files as well.

Thank you @DaveAtSafe! Your help was very useful, I have succeeded in what I tried to do. I should especially mention the usefulness of the Inspector transformer, because in one case the names of the custom properties were prefixed with the name of the (custom) property set, and in another case no prefix was added.

 

 

Greetings,

Frans

Hi @fransknibbe,

The Property Set information in the IFC file is stored as traits in the geometry hierarchy, rather than as feature attributes. To promote the properties to attributes, please use a GeometryPropertyExtractor transformer.

Leave 'Trait to Extract' blank to extract all the traits, but set 'Prefix Extracted Trait with Geometry Name' to yes. This will prefix each property with the property set name. This transformer will not expose the new attribute to Workbench, so you will need to add an AttributeExposer. You can use an Inspector transformer to view the features and the new attributes.

Alternatively, you could use the Revit reader, with the 'Building Elements with Hierarchy' data view to read the IFC file. The data views automatically do the property extraction, and simplify the geometry for better conversion to GIS. The Revit reader defaults to a .rvz file (which is basically a zipped IFC), but can read .ifc files as well.

Hi @daveatsafe, thanks first for the suggestion. I tried it however without success. As the screenshot, I could see the attribute but the value didn't show up in the table after the AttributeExposer transformer. Wondering what I missed there.

Interestingly, I manually added the attributes to 'Traits to extract; list in the GeometryPropertyExtractor, (no need to use AttributeExposer), I did get the attribute value populated in the output table. However, as I have about 30-50 attributes to extract, I'm wondering if by taking your method it could automatically extract all traits instead of manually enter them one by one.

Userlevel 2
Badge +17

Hi @daveatsafe, thanks first for the suggestion. I tried it however without success. As the screenshot, I could see the attribute but the value didn't show up in the table after the AttributeExposer transformer. Wondering what I missed there.

Interestingly, I manually added the attributes to 'Traits to extract; list in the GeometryPropertyExtractor, (no need to use AttributeExposer), I did get the attribute value populated in the output table. However, as I have about 30-50 attributes to extract, I'm wondering if by taking your method it could automatically extract all traits instead of manually enter them one by one.

Hi @sealjackii,

If you enabled Prefix Extracted Trait with Geometry Name (which I recommend), the attribute will be named '12d Model.Date'. Please try exposing that instead of 'Date'

Hi @sealjackii,

If you enabled Prefix Extracted Trait with Geometry Name (which I recommend), the attribute will be named '12d Model.Date'. Please try exposing that instead of 'Date'

Aha, thanks a lot Dave! your reply helps me understanding better how FME reading IFC data. Also, I like the fact that by using the Attribute Expose I could import the list of the names from another data source, for example, a CSV file that created by a python script that extracts all 200+/- attribute names from the IFC file. happy day! : )

Hi @sealjackii,

If you enabled Prefix Extracted Trait with Geometry Name (which I recommend), the attribute will be named '12d Model.Date'. Please try exposing that instead of 'Date'

Hi @daveatsafe, I'm curious if this can be done by TraitMerge to make it easier as I just read about this transformer. By the help doc, it sounds it can copy traits to joined feature as attributes. That sounds a right hit to bring out the geometry traits as feature attributes. However, I just tried it with the same IFC data I was working on, the requestor type is Attribute, the Supplier Type is Trait, and I left Supplier Geometry Part Selection blank to let it scan all geometry parts. You could see from the screenshot it has found some matches, however, the output feature didn't show any new attributes created and populated from the traits. I'm wondering whether I misunderstood the way to use this transformer.... thanks.

 

Userlevel 2
Badge +17

Hi @daveatsafe, I'm curious if this can be done by TraitMerge to make it easier as I just read about this transformer. By the help doc, it sounds it can copy traits to joined feature as attributes. That sounds a right hit to bring out the geometry traits as feature attributes. However, I just tried it with the same IFC data I was working on, the requestor type is Attribute, the Supplier Type is Trait, and I left Supplier Geometry Part Selection blank to let it scan all geometry parts. You could see from the screenshot it has found some matches, however, the output feature didn't show any new attributes created and populated from the traits. I'm wondering whether I misunderstood the way to use this transformer.... thanks.

 

Hi @sealjackii,

The TraitMerger is similar in purpose to the FeatureMerger, but allows you to join on traits instead of attributes, so you can skip the step of extracting the trait to an attribute first.

I'm not sure it will be useful for working with the IFC data, unless there is a need to merge feature types. The useful traits are buried quite far down in the geometry hierarchy.

Hi @sealjackii,

The TraitMerger is similar in purpose to the FeatureMerger, but allows you to join on traits instead of attributes, so you can skip the step of extracting the trait to an attribute first.

I'm not sure it will be useful for working with the IFC data, unless there is a need to merge feature types. The useful traits are buried quite far down in the geometry hierarchy.

Thanks Dave.

Reply