Created
August 20, 2015 01:12
-
-
Save xeolabs/4c146797d1f772833865 to your computer and use it in GitHub Desktop.
Usage of BIMViews Download component
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Initiate a download of a bunch of objects | |
var download = new BIMSURFER.Download(viewer, { | |
downloadType: "oids", | |
models: [myModel], | |
roid: ["xyz","xyz2"], | |
oids: ["xyz","xyz2"], | |
schema: "xyz" | |
}); | |
// Subscribe to progress updates | |
download.on("progress", function(e) { | |
// Total number of Objects being loaded | |
var numObjects = e.numObjects; | |
// Number of Objects loaded so far | |
var numObjectsLoaded = e.numObjectsLoaded; | |
// Percentage of Objects loaded so far | |
var progress = e.progress; | |
//... | |
}); | |
// Subscribe to completion | |
download.on("completed", function(e) { | |
// Number of Objects loaded | |
var numObjectsLoaded = e.numObjectsLoaded; | |
//... | |
}); | |
// Subscribe to errors | |
download.on("error", function(e) { | |
// Error message | |
var message = e; | |
//... | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment