I have take tags from a dwg and made a family with the value. Now i need to move them becuse they overlapp. I have made graph thats works but if there are many in the same place I have to run my graph multiple times. Is there any way to run it over and over again till there no longer are any clashes?
But right now if we previously had an annotation along the lines of =X002.9.99.MP999 in red box I show in the markup you’d shift V001.3.01.LS011 directly into it creating a new overlap that your logic doesn’t catch.
Basically what I’m getting at is there is an easy fix for the fist problem. However the ‘scope of the move’ grows with each element you shift.
If you limit it to just the active tags and ignore the subsequently created overlaps you can move each sublist of overlapping elements by a range of 0..List.Count(tagOverlaps@L2<1>)*height;, but you have to first group things by overlap.
To do the grouping you can use an iterative bounding box process where you take item 1 and test it for overlaps, get the combined bounding box of the two and expand it vertically by your offset distance and test again until no items are found. As you find items remove them from the list to search, and thereby you get a ‘set’ for the overlap, and a smaller set to iterate over. By expanding the bounding box’s max point on the Y axis by the distance for each item in the overlapping set to grab any ‘new’ items in the combined area. After that’s done you’ve got a ‘group’
Instead of processing the entire drawing, I recommend looking at getting the shift to work for a selection to start with.