Here is a little code snippet that you may find helpful. In a recent thread, we were helping a developer who wanted to select a component in the viewer as soon as the model was loaded using viewer.select([nodeId])
It appears that you need to wait for two different events if you want to make sure the selection is going to work reliably:
Here we go, the following sample illustrates how to wait for both viewer events and parse the model structure once they have been fired. As you can tell, it will be very straightforward to add some more events or change them if needed:
You can follow this conversation by subscribing to the comment feed for this post.