For this purpose, you might find useful the "InstancesToForest
" script (it's looking in the scene for instances of the objects in Forest Pack's item list. When it finds them they're added to FP, matching the position, rotation and scale).
Once having the Forest object, you can easily select used Custom Object(s) - for example via the quad menu (right click) - Select Forest Custom Object
and to process XRef Objet(s) from selected geometry I would suggest you to use the Convert Selected Objects to XRefs ...
tool (under References
- XRef Objects
Hope that helps.