Last active
March 3, 2023 00:04
Gets all database id's in the model
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
// Used in blog post http://adndevblog.typepad.com/cloud_and_mobile/2016/10/get-all-database-ids-in-the-model.html | |
function getAllDbIds(viewer) { | |
var instanceTree = viewer.model.getData().instanceTree; | |
var allDbIdsStr = Object.keys(instanceTree.nodeAccess.dbIdToIndex); | |
return allDbIdsStr.map(function(id) { return parseInt(id)}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment