Arranging TEXT and ALIGNED DIMENSIONS to a position as close as posible to polyline

Arranging TEXT and ALIGNED DIMENSIONS to a position as close as posible to polyline

Anonymous
Not applicable
955 Views
3 Replies
Message 1 of 4

Arranging TEXT and ALIGNED DIMENSIONS to a position as close as posible to polyline

Anonymous
Not applicable

Hello,

I have a number of drawings where the Text overlap the polyline and the aligned dimensions .

Please help me with a lisp that :
1. STRETCH the aligned dimensions above or below the polylines so it doesnt overlap the polylines or with each oder.
2. MOVE(without rotating) the text so it doesn't overlap de polyline or the aligned dimensions or with each oder.

Any help would be appreciated.

0 Likes
956 Views
3 Replies
Replies (3)
Message 2 of 4

Kent1Cooper
Consultant
Consultant

For the Text objects, this isn't the solution but could be the start of one -- MovePerToObject.lsp with its MPO command, available >here<.  It can at least Move the Text away from the Polyline, but it decides in which direction by the relationship of each one's middle-of-bounding-box to the nearest point on the path, and it doesn't do anything about how they relate to each other.

 

Using SELECTSIMILAR to catch all the Text objects, and the MPO command with a distance of 15 away from the path, it yields this:

MPO.PNG

 

But the "complete" task is enormously complex, if even possible.  If a Text object Moves away from the path, then needs to compare itself to every other Text object and every Dimension to look for conflicts, if it finds a conflict, how can it know in what direction and how far to Move again to get clear?  Then it would need to check for conflicts at its new location.  How can it know that the one just Moved should be Moved again, and not the other one in the conflicting pair?  And it will often find multiple conflicts....  It might be easy enough to move the Dimension text contents if they could be strictly alternating sides of the path, but that's not the situation, and some are not just kept in place or flipped, but also moved farther from the path, and not all of those moved perpendicularly.  I don't know of any way to look for conflicts other than by looking for overlap of bounding boxes, but a Dimension can't be compared to others only by its text content [its bounding box includes the definition points], and overall-Dimension bounding-box overlaps will "find" conflicts that don't really exist under your criteria.  And bounding boxes are orthogonal, which means some diagonal things that don't overlap visually do have overlapping bounding boxes.

 

I don't mean to be discouraging, but I'm not sure what you want to do can be automated, except in a rough first-pass way that will still require a lot of manual refinement [such as the MPO result above for the Text].

Kent Cooper, AIA
0 Likes
Message 3 of 4

Anonymous
Not applicable

Thanks for the fast reply.

I now understand how complex the task is. MPO does help a bit.

 

0 Likes
Message 4 of 4

ВeekeeCZ
Consultant
Consultant

You should consider simplifying things. For example, do you really need to label every single number? If the series is unbroken, I would remove the odd numbers and keep just the even ones. 

0 Likes