I have something that looks like a tree made of many lines. I wanna join them as one single object.
I've been trying with OnPolyLine but I cannot see any method appending Lines in a Polyline. You have to add points instead and you get wrong connected lines between the append points.
You might want to post a quick picture/file of your geometry so we can see what your working with. My personal inclination is that you really want a poly line here as a poly curve might potentially be more work to deal with later on down the line. Depending on the geometry your working with, creating a polyline from a series of lines should be fairly straight forward its just about how you approach the problem.
This is kind of what I thought you were working with. The problem is that Rhino will not join this into a single line object, since it can't have more than two line segements share a single vertex. Since I'm not sure what you're actually looking to do with this, its hard for me to suggest any other options. What I would consider is trying to find a way to organize those segments so that you could then access them in some sort of logical manner. Beyond that I don't know what to suggest here.