Get Property Set
Let's reuse our example in the Detailed instructions section.
<!DOCTYPE html>
<html>
<body>
<h3>Example</h3>
<input type="file" id="myFile">
<button onclick="myFunction()">Click me</button>
<script src="https://cdn.jsdelivr.net/gh/andrewisen/bim-whale/dist/BIMWHALE.min.js"></script>
<script>
var config = {
requiredEntities:{
IFCPROPERTYSINGLEVALUE: "IfcPropertySingleValue",
IFCRELDEFINESBYPROPERTIES: "IfcRelDefinesByProperties",
IFCPROPERTYSET: "IfcPropertySet",
},
selectedEntities:{
IFCDOOR: "IfcDoor",
IFCWALLSTANDARDCASE: "IfcWallStandardCase",
},
selectedPropertySets: ["Custom_Pset"],
allEntities:{
...requiredEntities,
...selectedEntities,
},
};
function myFunction() {
var file = document.getElementById('myFile').files[0];
var reader = new FileReader();
reader.onload = function(e) {
var lines = e.target.result.split(/\r\n|\n/);
var ifcFile = new BIMWHALE.IfcFile(lines, config);
var ifcEntites = ifcFile.parseIfcFile();
};
reader.readAsText(file);
}
</script>
</body>
</html>
Last updated