(Not entirely sure what you are using)
With SCAR, you'll have to limit the terrain where you want to search for the DTM so that it does not include the x, y you just found. And repeat this for every DTM where you will have to make the area more and more complex. This is generally not doable.
With Simba, you can just use FindDTMs, which will give you all the DTM's in the specified area.
E: Documentation,
http://wizzup.org/simbadoc/scriptref/dtm.html I didn't add further descriptions yet but at least there's an overview of the functions online.