@Anonymous wrote:
....
I would do this by using the bounding box of this block and search a specific area around that box. .....
All I need to know is, how to get the information if something is drawn inside of a rectangular shape (so if I would select the area with the green rectangle, nothing would be selected). .....
All sorts of questions arise:
By "this block" and "that box" [first sentence quoted above] do you mean the label block? If so, I assume you mean to search a specific area around the conveyor, not around the label [which isn't there yet to search around, if it's looking for a place where it can put it], but maybe I'm misunderstanding.
I assume it would be looking for open areas of that rectangular shape with [as suggested] crossing-window selections, hoping to find areas where it does not find anything drawn. But I don't see any green rectangle -- is something missing in the image?
What is the determinant for the places along the conveyor that need to be labeled? Most of the labels' connector Lines go to big magenta arrows [though on different places on them], and most of those arrows have labels connected to them, but one label points to nowhere's-ville along a conveyor segment, and one arrow isn't labeled. Is that one label really supposed to connect to that one non-labeled arrow?
What kind of object(s) is/are the conveyor? Is it one thing, of some kind for which a routine could somehow find appropriate locations along it? If so, what defines those locations? Are the arrows somehow a part of the conveyor object(s), or are they separate objects, and if so, what kind? I'm having a lot of trouble imagining how a routine could know what to point to, without some input from the User. And even if somehow selection can be automated [for instance, if the labels are all supposed to connect to the arrows, and the arrows are Blocks of a specific name], it's hard to imagine how it could decide on the order of the label numbering, unless somehow magically you always and only draw the arrows in sequence, so it can use their draw order.
There doesn't seem to be any regularity in the positional relationship of the labels to the conveyor -- different distances from it, some inside and some outside, etc. And there's a lot of "range" in possible open areas -- if a routine is just looking for open space adjacent to the conveyor, it's going to find something a lot closer to it than where most of those labels are. Can you get more specific about how the positioning of the labels should relate to the position of what they're labeling?
How should such a routine choose where to look next when it finds that something is drawn in an area that it looks at? Try the other side? Try a little farther away on the same side? Move along a little in a parallel direction? Which way? How much should it move over [in whatever direction] each time it has to try again? And of course, those possibilities depend on whether it can determine what is the "other side" and/or the parallel/perpendicular directions, which depends on what kinds of objects it's considering.
I don't want to sound too discouraging, but the whole thing seems pretty wide-open and indeterminate. But with some more specificity [a sample drawing would answer some of the questions], maybe a possible approach will become apparent.
Kent Cooper, AIA