I have a number of polylines (around 9000), a number of which have one or both ends touching another polyline. I would like to merge these ones together into one polyline - thus reducing the number of polylines and ensuring that each line represents one real-world object (rather than having multiple lines per object).
I cannot find a scriptable (preferably through a Python script) way to do this. Is this possible? It would seem to me like a fairly common operation to want to do, but I can't seem to find a built-in function.