Skip to main content

Hello.

Is there a possibility to read an ifc file, retrieve a list of all attributes (like it is present after running a workflow once and click on import from feature cache in the attributeKeeper), be able to select the ones to keep and keep only those in the writer? Or at least read a textfile with a list of attributes separated with , and use them as attributes to keep?

I build a workflow to work with IFC data and at the moment I specifically create a “new” workflow for every file, manually adjust the attributeKeeper from the feature cache and run the workflow with the same file a second time. I do not know beforehand which attributes are included in the ifc file, and it can differ with each file.

I already figured that the attribute keeper can’t work with user parameters. I tried using the Attribute Exposer with “Import from Dataset” or the Feature Reader Schema Output for a dynamic writer...but either I did not understand the answers given in other community questions or I did something wrong, but in neither of the two options I could generate a list of attributes as it was present if I look at the feature cache after running the workflow with the ifc file once and rerun it again.

Hi, @styx_a38. Apologies for the trouble you are facing with manipulating IFC attributes.

I’ll give you my suggestion for tackling this issue.

Firstly, you can merge the feature types coming in from the dataset your reading from using the Single Merged Feature Type option, you'll need to re-create the reader. What this will do is it will merge all the ifc feature types into one, so its easier to manipulate incoming attributes rather than having multiple on the canvas.

Another option is you can open the IFC Reader feature type dialog box and select Merge Feature Type, which essentially does the same thing as using Single Merged Feature Type above. More information on Merge Feature Type can be found here.

You can create a second IFC Reader, then go to the Navigator Window > Parameters > Features to Read > Max Features to Read and set it to 1. This will act as a schema drift watcher (any changes made to the attributes and files).

Then, using the SchemaScanner Transformer to modify the schema. Afterwards, use the ListExploder Transformer to expose the attributes from the created list, duplicate the workflow on the schema drift side, and use the ChangeDetector Transformer to detect the changes.

Then you can write it out.

A great resource to understand how to implement this workflow can be found in the FME Academy. You can read more on Dynamic Workflows here or here.

 


Reply