Highlight detect tool - nested instances

I tried to do what it said in this post.
https://forums.sketchup.com/t/how-to-get-components-global-coordination/46983/2