@Anonymous wrote:
... there are only a couple tidy issues I found so far.
1. The Polyline doesn't keep the orignal poloyline, whereas Line does.
2. The closed Lines don't use the orignal color and layer name.
Default color: Yellow, layer: Defpoints....
DON'T USE the DEFPOINTS LAYER! If Layer 0 is either off or frozen or both, objects on DEFPOINTS cannot be selected or Osnapped to. That would have the result you describe -- the end-closing Lines cannot be selected for joining. If that's the current Layer when doing the Polyline, I can only imagine that there's some distinction made in JOIN vs. PEDIT / Join that somehow allows them to be included. [I used PEDIT / Join for Lines and Arcs because JOIN didn't work with them in an AutoLisp (command) function, even though it did manually.] In any case, even using that Layer, try it with Layer 0 thawed and on, and it should work as expected.
You can Search for references to DEFPOINTS for many discussions about why you should not use it, this particular problem, etc., etc. Its use for such things is an archaism from way back in the days when that was the only Layer that would not plot. But it has been a v e r y l o n g time now since you've been able to set any Layer to not plot, so do that, and name it something relevant to what you're drawing on it.
Kent Cooper, AIA