You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As mentioned in #154, I'm getting an error of type: Cannot read properties of undefined (reading 'IfcAPI')
this is my configuration:
import{paths}from"./server-helpers";import{existsSync,mkdirSync,writeFileSync}from"fs";import{join}from"path";import{convert2xkt}from"@xeokit/xeokit-convert/dist/convert2xkt.cjs.js";import{sourceConfigs}from"./xktconverterconfigs";importWebIFCfrom"web-ifc";exportasyncfunctioncreateXkt(ifcFileName: string){constmedia=paths.media;constsource=join(media,"buildings","ifc",ifcFileName);constdest=join(media,"/buildings","xkt",ifcFileName+".xkt");// crea la cartella "buildings/xkt" se questa non esisteif(!existsSync(join(media,"buildings","xkt"))){mkdirSync(join(media,"buildings","xkt"));}if(!existsSync(source)){console.error("File IFC non esistente");}else{// Converte il file ifx in xktconvert2xkt({
WebIFC,source: source,configs: {sourceConfigs: sourceConfigs},output: (buffer)=>{writeFileSync(dest,buffer);},log: (msg)=>{console.log(msg);},}).then(()=>{console.log("Converted.");},(errMsg)=>{console.error("Conversion failed: "+errMsg);},);}}
The text was updated successfully, but these errors were encountered:
As mentioned in #154, I'm getting an error of type:
Cannot read properties of undefined (reading 'IfcAPI')
this is my configuration:
The text was updated successfully, but these errors were encountered: