How to find the distance between object boundaries using VBA? - CorelDRAW Graphics Suite 2019 for Windows - CorelDRAW Graphics Suite 2019 - CorelDRAW Community

Tell me, please, how this can be implemented. At least part of the whole issue.

I need to dot the points evenly inside the object. Evenly in width and height.

Earlier in the macro, I just selected the shape, calculated the length and width, and evenly set the number of points I needed.

However, the selected area does not always correspond to the actual boundaries. If, for example, I would now use the same macro to arrange the points in the letter "e", then some of the points would be in the "empty" space.

Therefore, I need to change the algorithm.

Because I always place all the points relative to the horizon, then I calculate the height and find what distance I need between the points vertically.

How to deal with horizontal distance? I decided that in each new row it was necessary to find the distance directly between the borders of the letter itself, the figure, and based on the result, put points.

And finally the question itself! or even a few questions ...

1. How can I clearly define the coordinates of the letter, curve, and not the selection itself? 2. How can I find the coordinates of the holes in a letter? If they are not searched and excluded, the dots will be put in an empty space.

I rely on how much time I need to put dots vertically. Every time I draw a horizontal line, which is larger than the object itself. I check the presence of intersections through the built-in "GetIntersection" command and through it I find the coordinates. For these coordinates I calculate the length, the distance between the points and put them. That's all. I did not get a quick answer here, but at least I will share mine.