Aah, I see. It looks like there are 2 of each thing, on top of each other. So you'll need to do it twice. You might have done it perfectly, but because of the identical object underneath, it didn't look like it.
I'll give steps and add some extra details, which you might not know, if you're new to Inkscape.
- click on the line (you should notice a lot of nodes (tiny gray diamond shapes)) along the path
- move the mouse slightly, but still over the line, and notice the mouse pointer changes to "the finger"
- click again (you should notice that the nodes on either side of the mouse have turned blue)
- click Delete Segment Between 2 Nodes button (you will not notice that anything has happened, but hopefully it has)
Now follow the same routine again, from the very first step. When you click on the line again, you'll notice that this object that is underneath has fewer nodes than the one on top.
Actually I'm not sure if you need both objects. You might decide just to delete one of the versions. You'll need to Ungroup the whole thing, to be able to easily delete things.
I'm not sure what's causing the extra lines to be created. Did you say they just appeared when y ou opened the DXF in Inkscape? Because it looks like there are a lot of end nodes in the file, and also other bezier curves, and I wonder why only these are connected by the extra line. It seems like it would be ideal to try to prevent the extra line.
Although I have seen this happen before. Some programs apparently try to connect end nodes. In one case, the user found a setting, and when they disabled it, the extra lines were not created.
I'm not familiar with the technical side of Inkscape's DXF import. Maybe there's something about it that causes this. I'm tempted to ask developers about it. It seems like the file ought to be imported without changing anything. Is there any further info you can provide, that you think might be relevant?
Did you save the drawing in Solidworks as DXF? Or was it another format?
Edit
If I understand correctly (and I might not) when you open the DXF in Inkscape, it's automatically converted to SVG. And then when you save as DXF, it's converted to DXF. But still, it seems like it should open it exactly as it is, and not add the extra lines.
Edit #2
I don't suppose there's any way to join all the individual lines, while you're in Solidworks? Because that would for sure prevent the extra line. There wouldn't be any open end nodes.