You could create two families.. the one you want to check and the one you want to check against..
objects can be part of more than one family..
The X,Y you want to check should be relative to another object, right?
Or would you like to check each X,Y in your layout every tick? (that sounds cpu-intensive)