Does anyone know how to quickly put the center point of the 10,000 texts on the drawing back to the center point of the circle corresponding to the drawing? Can it be realized with DYNAMO?

test_real_v2.dwg (945.3 KB)



I removed a block reference yesterday. But there is still an error. I don’t know why some circles are not allowed text points to their centers. Instead, multiple texts go to the center of the same circle.
MoveTextToClosestPoint_EX_vTEST.dyn (73.8 KB)

It does beg the question though…
How did these get in the model in the first place? Were they drawn by hand?

If not, maybe look at that as the problem instead of the resulting dwg?

These were originally entered into the model by cogopoint. But later, because many different people did the line design, it was reduced to hand drawing and lost the function of reading the Excel form. So now I am eager to draw the text of the drawing closer to the center of the circle closest to it. But he followed an unknown Sequentially going to the center of the circle that is far away. Is there any node that can be achieved? Is there a node that can distinguish the distance between different circles and texts?

Hmm, From the looks of the above, you look to be on a path to fixing this, and you’ve had the help of people much smarter than me.

I would just be re-itterating what Jacob said earlier, and that is that this workflow ought not to ever be used before.

Looks like to me that when it to the many people modifying it and loosing function from excel, that there needed to be stricter controlling / checking at that point of the design as well as how the items were inserted using the excel table.

Plenty of advice above to steps to fix it, but you arn’t going to get a magic button i don’t think.

These were originally entered into the model by cogopoint. But later, because many different people did the line design, it was reduced to hand drawing and lost the function of reading the Excel form. So now I am eager to draw the text of the drawing closer to the center of the circle closest to it. But he followed an unknown Sequentially going to the center of the circle that is far away. Is there any node that can be achieved? Is there a node that can distinguish the distance between different circles and texts?
test_real_v2.dwg (943.8 KB)

MoveTextToClosestPoint_EX_vTEST.dyn (77.5 KB)

Ok, so this is a great example of when the ‘why’ you’re performing a task is as if not more important than the ‘what’ of the task.

While we can move each text to the closest circle, we can’t ensure that:

  1. There isn’t a situation where two text elements share one closest circle.
  2. Once done moving them to center points, we can’t ensure that each text is associated to the same circle that it was before the cogo points were nuked.

As a result of both of the points above, whatever end condition you wind up with will be a condition where you have to manually verify all 7000+ text values against real data… and NO ONE wants to do that.

Any chance you have the original COGO point dataset and you could recreate the COGO points?

There are original COGO point data sets, but a lot of things have been processed by more than a dozen people under the drawings downgraded to ordinary dwg. The original COGO point data sets have lost their meaning. The circles have been modified many times by more than a dozen people. But They are processed manually. I have no choice. I have to move the text to the center of the circle. Then make the data set into a new COGO point data set. But I can’t manually adjust more than 7000 points. Because I Extremely thin body and my arms lack muscle and stamina, I try that manual adjustment can only do about 400 texts Orz a day :joy:

:rofl:

What did the text indicate before?

May I know that how to move each text to the closest circle :joy:
I can’t find the node in dynamo :smiling_face_with_tear:

I mean that more than 7000 texts and are near more than 7000 circles. This means we need to manually adjust the point of the text to the center point of the circle that has been manually adjusted by more than a dozen people for a month so that I can now Then make the dataset into a new COGO point dataset.

Looking at this now. Hopefully I’ll have something in the next 17 min or so.

Are the objects actually on layer 0 in the real data set, or can we use layer name as a filter to grab text and circles?

IT is ok .any method is ok . :innocent:
I mean over 7000 texts, close to 7000+ circles. This means we need to manually adjust the points of the text to the center points of a circle that has been manually adjusted by a dozen people for a month so that I can now remake the dataset into a new COGO point dataset. Because we realized that the problem is that we can no longer use the manual method to design the position of the circle. No matter what method we use, we have to adjust the current more than 7000 texts to nearly 7000 that have been manually adjusted by more than a dozen people for a month. The center point of a circle. The manual method means using the mouse all day long to frantically use the move command. The fingers and arms will be abolished first.

Current data set has 56 text or MText objects (54 Text, 2 MText), but 55 points. No matter how we sort it you’re going to have two items on one point.

What do the numbers indicate?

@jacob.small

Yes, this makes it impossible to let Dynamo figure out which text belongs to which circle. And if there have been a lot of manual work after the export from CoGo point there are two complete different files if we compare the original file and the exporten.

I need to keep my original thought that it can’t be done automatic.

MoveTextToClosestPoint_EX_vTEST.dyn (77.5 KB)
test_real_v2.dwg (943.8 KB)

Yes, this makes it impossible for Dynamo to figure out which text belongs to which circle. The only thing I can think of now is to automatically adjust the text to the center point of the circle closest to the text for the time being. There may Be some overlapping failures. But the manual adjustment is impossible. A Lot OF Repetitive Wound The Mouse Will Physical HURT Me. Ments for a day and only last for 4 hours and only completing more than 400 text and clear adjustments. My hands were shaking at that time.

No matter how it is sorted, it is okay to have two items at one point. I want to solve most of the problems first. Manually click more than 7000 times. I would like to carefully observe more than 7000 times. May I know how to move each text to the closest circle :joy:
I can’t find the node in Dynamo :smiling_face_with_tear:

Didn’t finish before the last meeting… getting back to it now.

@Ken.HoGXTTP

Not a dynamo solution, but here is the data extraction based approach i have used in the past for a very similar type of exercise.

It uses Pythagoras theorem to calculate the shortest distance (hypotenuse) between the centre point of each circle and the insertion point of every piece of text.

Then i normally import the resultant x / y / value information as CoGo points.

If you use Dynamo at this point to create the CoGo points you will be able to specify the value as either the point name or description and then use a style to display it.
Or you can use the resultant x / y as a destination co-ordinate in a move command on the text.

As many of the other responses have stated this will only get you so far, any clusters will require manual checking.

NB. Rename attached file from .7z to .zip to access.
test_real_v2_cogo.7z (864.8 KB)

This will shift a selection of text objects who have a location or position attribute to the centroid of a bunch of circles.
Moving Text to Approved Locations

Move Text to Circle Center.dyn (127.4 KB)

Instead of just moving, I decided to also draw a line on a new layer (well unless you have a layer named whatever it was I used, which is unlikely). This will help you identify which objects were shifted incorrectly if you aren’t happy with the results.

Graph works by selecting a bunch of stuff, filtering out anything which isn’t text to get the objects to move (all text), and filtering out anything that isn’t a circle to get the list of approved points. As a result you could select a piece of text and a single circle (or a few circles) and run the graph to get the text into position. You may want to consider moving ALL your circles onto a layer and gathering them thatway instead, then it’d just be a matter of selecting out of position text and running the graph.

Hopefully this will help prevent a repetitive stress injury.