In reply to eliot.f:
You are asking for introspection. The only ways to get this is by writing VPI routines to do this, or using tool specific commands that can traverse the design database.
I have a DVCon paper that shows you how to use the VPI to do this.
To use a tool based solution, you’ll have to look at your tool documentation or contact your tool vendor directly as this forum is not for discussing tool specific issues