I assume that you have access to SourceLink (is it the same login name and password as for accessing the forum?), in which case, take a look at Solution 11138210 on SourceLink. I am sure that there are other solutions out there, but this is the first one that I found that seems to meet your requirements.
You will see for each shape that the following attributes are accessed: lpp, bBox, term~>name (the first is not the layer name as you ask, but the layer-purpose pair).
In reply to skillUser: