ifc

Failure to write edited values into new IFC file in WIT using ExportFileAsIFC using the same code as in the IFC.js Crash Course


When I attempt to edit an IFCBUILDINGSTOREY name value and write a new IFC file in WIT using the ExportFileAsIFC code from the IFC.js Crash Course IFC editing section, I get an error: Line object cannot be serialized: Object { expressID: 138, type: 3124254112, GlobalId: {…}, OwnerHistory: {…}, Name: {…}, Description: null, ObjectType: {…}, ObjectPlacement: {…}, Representation: null, LongName: {…}, … } IFCWorker.js:87228:15. The value is definitely changed in the IFC data in the browser console output but it doesn't get written to the new IFC file. I cannot see any difference between my code and the course example code. The problem appears to be that the revised IFC data in the browser console output defines the storey as IFCBUILDINGSTOREY in the IFC.js course video but on my laptop the storey is defined as OBJECT in the browser console output. So I think it literally cannot serialize the non-specific OBJECT. I have posted the project on my GitHub at https://github.com/quarto-zz/WIT2 Please can anyone tell me what is different?


Solution

  • Looks like a regression in web-ifc@0.0.36. We are looking into it. In the meantime, it should be solved by using the previous version by running the command: npm i web-ifc@0.0.35 web-ifc-three@0.0.118.