Good day
I did respond to your reply but it seems that it was moved to a different forum. https://forums.autodesk.com/t5/autocad-for-mac-forum/re-cannot-join-polylines/m-p/7202484 As noted by the other community users, this is AutoCAD for Mac and it would seem that the FLATTEN command in AutoCAD for MAC does not work.
This might be a little advanced but here is a thread I found that might help you:
Aside from being rather absent from the blogosphere, I have found myself using AutoCAD for Mac more and more lately. In fact, my company and I are preparing to host an AutoCAD for Mac training class in the next month. While the gap between the Mac and Windows releases of AutoCAD 2011 left me wishing for more, 2012, and especially the new 2013 release dramatically narrow the gap between the two platforms.
No matter how small the gap between platforms, a missing tool is a missing tool. Since AutoCAD for Mac was a complete rewrite, and the Express Tools team has long been dissolved, it only makes sense Autodesk chose not to port Express Tools to the Mac platform. Regardless of the incredibly logical reasons behind the decision, it still doesn’t supersede the frustration of a missing tool.
I came across that very situation as I opened a drawing that was sent to me and had linework drawn at many elevations. Express Tool users know the perfect solution to this problem is the FLATTEN command. Trouble is, AutoCAD for Mac doesn’t have the FLATTEN command since its part of the Express Tools bundle.
My solution?
Create a Custom Macro
Booting Parallels to open the Windows version would have been too easy. Instead, my solution was to create a custom macro. I was able to very easily do this by:

Creating a custom AutoCAD for Mac
- Inside AutoCAD for Mac, open Tools > Customize > Interface (CUI).
- From the Customize dialog, click the [+] button to create a new command.
- Within the Properties section of the Customize dialog; give your tool a name (i.e. Flatten), and an optional description.
- Copy the following into the Macro portion of the Customize dialog:
^C^C_SELECT;_MOVE;0,0,0;0,0,1e99;_MOVE;P;;0,0,0;0,0,–1e99; - Choose an icon for your new macro. Here’s the FLATTEN tool icon from the Windows version of AutoCAD.

What the above macro does is moves the objects you select above the maximum range for AutoCAD which results in those objects being placed at the maximum height of 1e99. Now that all of the selected objects share a common elevation, we can move them down –1e99 and the final elevation will be 0. Put another way, the functionality of the FLATTEN command has been emulated through a Macro.
a user commented: Follow the same steps but copy this one and it will work:
^C^C_SELECT;_MOVE;_p;;;0,0,1e99;_MOVE;_p;;;0,0,-1e99;;
I hope this helps.
Regards
Marnus van Staden
Technical consultant & Civil 3D support Specialist
Prokon Software Consultants
Kind Regards
Marnus van Staden
N.DIP Civil Engineering | Senior Technical Specialist
Autodesk Trainer | Draughting Consultant



________________________________________________________________________________________________
If you find my post useful, please give me Kudos. If my post solved your problem, please accept it as a solution.
Apex Solutions Youtube Channel