Use Dynamo To Automatically Adjust Labels for Plan Readability

Does anyone have experience adjusting label locations for readability using dynamo to automatically shift them? Is this something that is doable? Just wondering as every so often a DWG will come my way that we would like to blanket label a bunch of points, blocks, structures, etc and doing that would create a whole bunch of initially overlapping labels.

1 Like

This exact scenario comes up a lot and it’s much, much, much more complicated than it initially appears. Yes, it is technically possible but it’s extremely involved.

How do you know that a tag has good “readability”? It would mean that it has little to no overlap with other objects right? But what if that overlap is large enough that nothing visually interrupts the tag, like on a floor or large pad? So now you have to look specifically at visual overlap. Which would depend on the view, filters, scale, cut plane if there is one, and view direction among other things. All of that builds on itself since the overlapping of objects could help or hurt tag placement and views often have lots of objects and plenty of overlap.

Then comes the issue of determining how to actually lay out tags using that information. Do you block out all the areas that are too busy for annotations and try to place tags in the “open” spaces? Or do you place tags at their default locations and move them? How do you know where to move tags if every tag is fighting over the same useable space? When do you add a leader? When do you move something outside of the main view or associated area? Which tags get priority? What happens when things get added or removed from drawings?

This is a fairly simplified explanation of the problem, but it’s still a very complicated process. However, it’s actually a great example of the difference between computer logic and human pattern recognition. These are the kinds of things that humans can quickly and easily solve visually without much effort but become extremely convoluted when translating to spatial and conditional logic for a computer to solve.

You’re likely better off writing something that automatically labels everything for you and then allows you to go in and manually fix the problem areas. I know that’s probably not the answer you’re looking for but that’s how I’ve always felt about this problem. Maybe someone else has been able to make some major progress on this and can add to it. I’d love to hear what other people have done because this is a common problem for many people.

3 Likes

I understand your point. Thanks for the good explanation. Would it be difficult to go just a slight step further than doing the automatic labeling and have the label locations set so that they at least don’t overlap with each other? Scale would have to be taken into account, but being able to start from a position where the labels themselves don’t overlap could be a nice starting point unless that is not worth the development time.

The situation I am thinking of where this would be most effective is if someone were to send me a bunch of GIS information on something like sewer manholes or points for a large area and I would just be looking for a way to blanket label those point names and have those labels not overlap each other. Then I could manually do any finishing adjustments if the labels overlap something in the background.

Again maybe this is very difficult to do and not worth the development time or each case is so different that it is tough to have a somewhat “one size fits all” dynamo graph.

Example of Point Labels:
image

1 Like

Sure! That’s absolutely doable. You would have to take into account the size of the annotation and the scale, like you said, but it shouldn’t be too much effort (depending on how far you take it.) With the known size of the annotation and the scale of the drawing you could calculate how much space you need between tags. You should then be able to group tags by location (roughly based on that spacing) and then create a new array of placement points based on number of overlapping tags and the calculated spacing between each one.

2 Likes

Some inspiration from VASA may be of assistance here. If you set the scale of your voxels to match the scale of the annotations you can likely find empty cells to populate rather quickly. You can then iterate over the target points to get the nearest empty cell, remove that cell from the list, place the tag, and continue the iterations.

2 Likes

Check it:

3 Likes