From the documentation it looks like you should be able to call setThemingColor with any dbId, but it seems to only work if the id that you pass is a leafnode? Is this correct?
Also is there any way to bulk call this method, or is it only one single leaf node at a time? I would like to pass an array of dbId's into the method.
Yes, it's only working with the leaf nodes in my experience. However, leaf nodes of a parent node can be retrieved in this way:
After retrieving all leaf dbIds, you can simply write a for loop to call
setThemingColor
for every dbIds like this way:Hope this help.
Ref of the function
getLeafNodes
: https://forge.autodesk.com/blog/hidding-completely-viewer-nodes-no-ghosting