script for points
script for points
1.It should take as input a LIST of existing COGO points with the HANDLES as
KEYS and the NAME of the points as VALUES, NOT A DICTIONARY.
2.It should allow me to input a string specifying the COGO points I want to
RENAME. If it's a single point, I'll write just one (e.g., sp05), and if there are
multiple points, I'll use a sequence (e.g., sp12-sp15).
3.Another input should allow me to enter a string specifying the new NAMES
that will replace the points mentioned in step 2 (e.g., sp03-sp06).
For example, if I need to rename multiple points from the INPUT LISTS, which
contains the following:
I should replace the following NAMES/VALUES: [sp12, sp13, sp14, sp15] with
[sp03, sp04, sp05, sp06] as mentioned in steps 2 and 3. Resulting in
something like this:
But to make the exercise simple you can ordered the values list like [sp01,
sp02, sp03, sp04, sp05, sp06, sp07, sp08, sp09, sp10, sp11, sp12, sp13,
sp14, sp15]
However, since duplicate values [NAMES] are not allowed, the values from
the original list that were not modified should be renamed as well except for
those values minor to the input sp03 in this case. The remaining points
[sp03, sp04, sp05, sp06, sp07, sp08, sp09, sp10, sp11] will become [sp07,
sp08, sp09, sp10, sp11, sp12, sp13, sp14, sp15].
But The final output list of NAMES should maintain the original order base on
the HANDLES mentioned above, while only replacing the necessary values,
resulting in: