Here I am, 3 years later, just now needing to use this Class of Tony's. First I'd like to say thanks to Tony for making this code available. It works fine, except for the full context that I would like for it to....
Background, Civil3D makes renumbering Curve/Line/Spiral Tag labels a slow and cumbersome task, especially if one wants to renumber matching items to the same number. For instance, my line labels L1, L5, L6, and L12 all have the same bearing & length so I want to renumber all of them to L1. This cannot currently be done using the C3D API's, at least not that I've yet discovered, so I'm using the "EditTagLabels" C3D command and Tony's code to call it.
2 issues I've run into, that I'm not sure how to fix. First is that the edited label's display does not update until after my command ends, which makes it difficult to keep track of which labels have already been changed.
Second, and more of a problem, is that the "EditTagLabels" prompts changes when the new number duplicates an existing number. Which means I need to provide an extra response for the command when a duplicate is found (which will be most of the time, but I still need to account for both scenarios). Is there a way to accommodate for this? These are the 2 lines that I somehow need to be just 1 that works in either case:
CaddZone.ApplicationServices.CommandLine.Command("EditTagNumbers", entRes.PickedPoint, "");
CaddZone.ApplicationServices.CommandLine.Command("EditTagNumbers", entRes.PickedPoint, "c", "");
The biggest hurdle is that I have no way of determining before the command is run which numbers are already in use.
Any hints on either one, or both, of these issues would be greatly appreciated.
Jeff