This is a quick start guide - i.e. this is intended for those who are exprienced in web development. Check out the detailed instructions for a more detailed explanation.
Use a FileReader
Create a new BIMWHALE
object
Call parseIfcFile()
You are now done! If you have understood the snippet above, then head over to Simple Example. Otherwise, check the Detialed Instructions for a for a more in-depth explanation.
Make sure you include TBW before your main function.
Use BIMWHALE.js
. by:
Creating a new BIMWHAlE
object
Calling the method parseIfcFile()
Please note that the config object is missing at this moment.
The final result should look like this:
Please note that this code doesn't output the result. You won't see anything on your screen.
Simply log the IFC Entities like this:
You can download the latest version of BIMWHALE.js
from the content delivery network (CDN) .
Not sure what a CDN is? Check out:
Create a HTML page with an . We'll call our input myFile
.
Get the selected file using a classical DOM selector. See for more information.
Use the to read the content of the IFC file. We will assume that the input is a correct IFC file. In other words, we will assume that the file contains text. That's why we call reader.readAsText(file)
.
The onload
property will handle the actual reading of the file. See for more info. Notice that we .
Congratulations, you are now ready for the .