Closed ctrlmaniac closed 4 months ago
You need to pass a configs
into the convert2xkt
call.
I just made convert2xkt treat the configs arg as optional, so you could either supply an empty map for that, or update to the latest release.
See here for how to use on node:
https://github.com/xeokit/xeokit-convert/blob/main/convert2xkt.js
Where do I get these configs? I've copied the file you provided in the src folder but now it says that Cannot read properties of undefined (reading 'IfcAPI')
Where do I get these configs? I've copied the file you provided in the src folder but now it says that
Cannot read properties of undefined (reading 'IfcAPI')
See here for where the configs are obtained for passing into convert2xkt: https://github.com/xeokit/xeokit-convert/blob/main/convert2xkt.js#L172
This is the nodejs script that invokes the convert2xkt
function and provides the configs argument, along with the WebIFC argument required for converting IFC.
We don't have checking for missing arguments in the convert2xkt
function, but the nodejs script will provide a working model for yoy to use the convert2xkt function on node.
This is the best support I can provide at the moment for your use case of calling convert2xkt function from your own nodejs script. If your enterprise needs prioritised support, please get in touch here: https://creoox.com/en/contact/
ok but I cannot spawn the commander convert2xkt command from a node.js script since it is not exported from the package.json as en entry file... so I do not know how to make the function works either!
Try cloning the repository and modifying the convert2xkt.js script
I'm trying to use convert2xkt with node.js but i'm facing some issues...
Firstly I had to import iyt in this way:
otherwise I'm getting a convert2xkt is not a function.
secondly I'm getting this error:
Conversion failed: TypeError: Cannot read properties of undefined (reading 'sourceConfigs')
this is my configuration:
how to fix these issues?