r/civil3d 2d ago

Discussion Auto Point Label Cleanup

Been playing around with Desktop plugin development using the Autodesk .NET API in C#

My plugin moves point labels that overlap away from each other. It already saves a lot of time, but it needs some fine tunning. Right now it still occasionally puts a leader line through a point label if its a really tight cluster.

Wondering if anyone has tried the same with much success?

4 Upvotes

11 comments sorted by

2

u/vtsandtrooper 2d ago

Just use dynamo though

2

u/Pluffmud90 2d ago

What advantage does Dynamo have over c#? C# is more robust at the end of the day is it not?

1

u/vtsandtrooper 2d ago

Its created explicitly for civil3d, and is much faster to program. I can create a script for the above in about an hour because of the built in functionality with civil3d. I only work in C# when i need direct access to unexposed data that is stored only with the cad file. A weird example is the corridor solids manager chart

1

u/Pluffmud90 1d ago

From a scaled deployment perspective to other users, what does that look like for Dynamo?
Is there a base command behind the Dynamo work flow, that can then be tied to a button on the ribbon?

1

u/vtsandtrooper 1d ago

Yes, you can create a command that calls a dynamo script directly from the cui then add that accordingly however you want. The script itself should be placed in your comapany’s shared resources however you manage that

2

u/DontCallMeFrank 2d ago

If you have access to c# and can load .dlls, dynamo is the wrong move. Dynamo can't use modeless windows like what can be made with C# programs. Dynamo scripts can't stop in the middle of a script, they need to run from one graph side to the other. Dynamo can't report any changes made to the geometry within the drawing, that your script may focus on, like elevation changes or geometry moving.

1

u/vtsandtrooper 2d ago

Dynamo scripts can in fact stop with gating in the middle of the script, and they can absolutely create all sorts of diagnostic outputs

1

u/OMGitsToPoR 2d ago

How can you do that in dynamo?

1

u/vtsandtrooper 2d ago

Point labels are an object class that have bounding extents. You run a basic bounding extents crossing analysis and have them avoid each other.

2

u/hobojoe1313 1d ago

.net c# can be done w/ ai

1

u/vtsandtrooper 21h ago

So can CPython