Any examples of IFCXML (IFC4) files?

Has anyone implemented an IFC4 ifcxml export option, yet? If so, do you have any sample files for others to examine and test their applications with?

1 Like

My opinion is that buildingSMART should provide a converter from IFC to ifcXML. Why a vendor should support two different formats having the same content?

3 Likes

What do you mean with “converter”? With the ifcDoc Tool you are able to convert StepFiles into XML-Files: http://www.buildingsmart-tech.org/specifications/specification-tools/ifcdoc-tool ? By my own experience I noticed that the converter does not output valid xml-structure, but maybe it was a mistake by file or me.

Thanks Robert! I was not aware of that. Hopefully, it will be fixed, if there is an issue.

There are issues, I quickly tested it when Jeff originally posted. Needs some attention and improvements.

@lassi.liflander I would argue that since both formats are actually part of the base schema (EXPRESS and XSD), there should be support for both IFC-SPF and ifcXML export directly from the tools. Not all workflows require it, but some may. This may actually be better suited for a larger IFC toolkit discussion…

My implementation in ProVI supports both STEP and ifcXML read/write processes. I assume any software that bases their IFC implmentation on the IFC Engine (rdf.bg) has this functionality implemented.

I can provide some Proxy-filled files if you wish.

1 Like

I’m working on a project that exports IfcXml files of visualized models of buildings. The documentation has some IfcXml example files which don’t load in Revit 2020, but the STEP files do load. I have tried this on several files including:

https://standards.buildingsmart.org/IFC/RELEASE/IFC4/ADD2_TC1/HTML/annex/annex-e/wall-with-opening-and-window.htm

The error (log file) that Revit gives is, “General ERROR: There was an error reading the IFC file: Can’t determine XML file schema… Aborting import.”.

I have tried changing the schema location to a URI instead of a local file, but that didn’t help. I have also tried using IfcDoc to convert the STEP example to IfcXml, but that didn’t work either.

My IfcXml exports are modeled after the examples and also have the same issue. Any guidance is greatly appreciated. -Trevor

1 Like

Revit, to all of my knowledge, currently only supports IFC2x3 as ifc and ifcxml file format, and IFC4 only for ifc (stp) file format. Since the ifcXML4 format has been changed (optimized) against the ifcXML2x3 format, these xml files are not downward compatible.

1 Like

@TrevorV - if you wish, we could exchange some files and test our implementations. Find my email adress here https://www.cms.bgu.tum.de/en/team/jaud.

Thank you for your answer. It is true, Revit doesn’t support ifcXML4 yet. I switched to STEP export. Too bad though, I was enjoying using the ability to serialize C# objects into XML.

STEP works stable and good for geometry & object structure definitions from DWG to Inventor (ipt) and vice versa. I bet Solidworks does too, probably even better.

Don’t know how Revit behaves. No experience with it or xml, no need for it.

Can the ifcDoc Tool also perform the opposite conversion, from XML to STEP files? The link you posted is not working by the way. Does anybody know where the tool can be downloaded? This should be its GitHub repository but there are no instructions on how to build the program.

The github repository has some compiled releases available here: https://github.com/buildingSMART/IfcDoc/releases
It has the functionality to convert between serialization formats but please review the results carefully, it might need improvement.

1 Like

I just tried it, but I can’t figure out how to convert between STEP and XML format. When importing an .ifcxml file, for example this one, a window named “Select Schema” appears, but I can’t select anything because the content of the window is empty. The User Guide mentions that it’s possible to import ifc files, but when clicking on File > Import Files… the file picker does not allow opening .ifc files. Does anybody else have the same issues or am I too dumb to figure it out?

Sorry, this isn’t a reflection on you at all.
IfcDoc documentation needs revision, and there is a lot of improvements for UX and UI that are needed if IfcDoc is to be used by a larger audience for this and other functionality.

1 Like

IfcOpenShell has some experimental IFC XML parsing support, but when I tried with the wall and window opening file mentioned by @TrevorV and found that IfcOpenShell couldn’t parse it.

@aothms elaborates on it and explains how that particular IFC XML is invalid. I also tried another file which also couldn’t be parsed, and Thomas also describes how there are some oddities. Full description here: Support for read and write .ifczip · Issue #834 · IfcOpenShell/IfcOpenShell · GitHub

@aothms has made the IfcOpenShell IFC XML parser less strict so that it can now parse these files, but his summary says it all:

Anyway neither of the files crash now anymore, but I think as a community we’re pretty far away from reliable ifcXML exchange especially in the IFC4 ‘dialect’.

@jonm - I think you’ve done a lot with IFC XML - have you got any sample files to provide that are created by a modern package (in contrast to the buildingSMART doc examples, which seem generally unmaintained)?

The BlenderBIM Add-on now has IFCXML import support. This is highly experimental and things will likely have lots of issues, but if anybody in the industry wants to push IFCXML, hopefully the BlenderBIM Add-on can help be a platform to push the boundaries of the industry. https://blenderbim.org/