I've got a drawing with a couple of polylines in it, and I was having trouble joining a new one with an old one. I checked elevations, and they were both at zero. I checked for zero-length line or arc segments and found none. I then tried using the PEDIT function and giving some fuzz distance before joining, but to no avail. Finally, I tried the following lisp code:
(foreach x (getcoordslist (car (entsel))) (command "point" x) )
Where (getcoordslist) returns a list of the coordinates of a polyline. I've already verified the code for that function, and it works perfectly. I checked the code above on other polylines, and it worked perfectly as well. However, when I used it on one of several polylines in the attached drawing, I encountered an odd situation in which the x-coordinate was 'reversed', or multiplied by -1.
I did some more checking, and when I re-drew the polyline, I had no trouble joining. I then checked several other polylines which had been created at the same time (all by offsetting from an original), and found that all the lines I'd offset from the original line including the original line, (the purple one marked as a centerline in the attached drawing) were like this. None of the other polylines in the drawing were like this.
I did some googling, and couldn't seem to find anyone else who'd had this problem. Does anyone here have any ideas? I've attached a copy of the drawing (it's for work, so I had to remove other objects, but I verified before uploading that the problem is still occuring), as well as a copy of the custom lisp function. Worth noting is that the first red line on the left, which shoots off at a 0 degree angle near the top is the line in question, and it's already been redrawn so that I could join it.
your polyline as be drawn with a normal vector reflected (0, 0, -1) instead of (0,0,1). It was drawn when UCS was rotated 180° in X or Y.