RE: How to find point on nearest shape elment ...

I use MicroStation connect update 16 and trying to automate a process with VBA. I like to find the way to determine the shape element (is a grid of rectangular shapes) that contains or is intersected by a fence drawn by the user.

I thought about using the the "ElementsScanCriteria" and use the method: "IncludeOnlyWithinRange" but there is no example for the method and I am new to vba and microstation programing. Any help would be much appreciated.