Flatten CAD drawings in AutoCAD for Mac

At work I have come across many drawings that were supposed to be 2D drawings, but turned out to be full of elements (lines, blocks, etc) that still had a Z-coordinate. This can be a real problem when having to use this existing drawing as a base to work from. At the office I use the ‘FLATTEN’ command (Autocad 2010; Windows), which flattens out all 3D objects and objects/elements that have a Z-coordinate in them. This works great and after running the command the drawing is now, usually, totally 2D. Sometimes it does skip something so I always check in the properties menu, by selecting everything in the drawing I need to flatten and check per element/object type if the elevation/Z-coordinate is set to ‘0’. But like I said the ‘FLATTEN’ command usually works. One thing to remember though, is that flattening very many objects can actually cause AutoCAD to crash or take a long time to process everything. Or it just doesn’t seem to have worked at all. Therefore I usually flatten the drawing in somewhat smaller sections. That way it always works and AutoCAD can handle it just as fast as any ‘normal’ command.

Now, the ‘FLATTEN’ command does not work in AutoCAD 2012 for Mac. The closest command to it is ‘FLATSHOT’. This “creates a 2D representation of all 3D objects based on the current view“. This does not however actually flatten a drawing (or elements/objects in a drawing. This just creates 2D representation of the viewing plane, and which is then saved as a block in your drawing. The block can then be exploded and edited if necessary. A very handy command but not what is needed to flatten a drawing.

Of course there is a solution to this, and not a very difficult one either. You can just create a macro for it, which you can then add to you Tool Set Palette. There are a few different options to consider though (depending on whether you use UCS or WCS; see this article for more information), or just create all of them.

1. Flatten selected object to WCS:

^C^C_UCS;_W;_SELECT;\_MOVE;_p;;;0,0,1e99;_MOVE;_p;;;0,0,-1e99;;

 

2. Flatten selected objects to current UCS:

^C^C_SELECT;\_MOVE;_p;;;0,0,1e99;_MOVE;_p;;;0,0,-1e99;;

 

3. Flatten entire drawing to current UCS:

^C^C_UCS;;_move;_all;;0,0,1e99;;_move;_all;;0,0,-1e99;;

 

With the above mentioned syntax we can create the macro/macros. Access the ‘Customize dialog box’ by typing in ‘CUI’ in the command line. Click the ‘+’ button on the ‘Commands’ tab to create a new command (macro).

CUI Box

Name the Macro however you want, but calling it something like ‘Flatten’ makes sense! Type in (or just copy) the above mentioned syntax in the ‘Macro’ box. If you want to add an icon to it, which is especially handy if you want to add this macro to a Tool Set, you can copy in the following to get the same icon that is used for the ‘FLATTEN’ command in the windows (full) version of AutoCAD (if you are using AutoCAD LT, you need to follow the same procedure to create a macro in order to quickly flatten drawings):

RCDATA_16_FLATTEN

This gives you the icon as seen in the image above. Then all you need to do is add the macro to whatever Tool Set you want for easy access. See picture below for example:

CUI Tool SetsThat’s it. You are good to go!

^C^C_UCS;_W;_SELECT;\_MOVE;_p;;;0,0,1e99;_MOVE;_p;;;0,0,-1e99

  18 comments for “Flatten CAD drawings in AutoCAD for Mac

  1. MBS
    April 26, 2012 at 02:53

    THANKS for the Post it Help ๐Ÿ™‚

    • Peter Webster
      September 25, 2012 at 03:36

      This is great! Thanks for the help.
      my first self created macro.
      works like a charm!

      • September 25, 2012 at 06:01

        You’re welcome! Good luck!

  2. Cristal
    October 15, 2012 at 08:43

    Hello I am having this problem and found your post. I have tried making the 3 different macros but the file is still not flat. When I look at it on the cube I can see it is not flat. I am not sure what happened but it was originally a file our professor gave us so maybe there was elements that were not flat. I erased all the files or thought I did and redrew everything but still having trouble. Really would appreciate your help. I have autocad mac 2012. When I am in CUI and I apply the macros I have made and press ok nothing changes.

  3. kirthana Sudhakar
    November 5, 2012 at 21:34

    This post was so well detailed and the steps were very clear, i searched for so long for an appropriate solution and was so happy when this worked like a charm!!! thank you!

    • November 5, 2012 at 21:43

      Glad it worked!

  4. kirthana Sudhakar
    November 5, 2012 at 21:36

    ๐Ÿ™‚

  5. arash
    November 20, 2012 at 20:43

    hi thanks a lot for your information..:)
    i didi all the steps but still it dose not work, it say the unknown commond..:(

  6. November 29, 2012 at 00:32

    oh my god – that was so really helpful.
    thanks a lot!

  7. Andrea
    June 24, 2013 at 18:13

    Thnx a lot for this post! really appreciate! T_T really help meeeeee

  8. sussy
    October 15, 2013 at 21:01

    Thank you very much!! I just found the solution to my all problems with dwgs ๐Ÿ™‚

  9. BrunoMCP
    November 5, 2013 at 19:51

    It doesn’t seem to work on AutoCAD 2013 for Mac… ๐Ÿ™

  10. Betsy
    February 26, 2014 at 22:09

    Yeah, can’t get any results on AutoCAD 2013 for Mac either. ๐Ÿ™

  11. Sara
    January 25, 2015 at 19:46

    Hi!
    In my toolsets panel (last picture) I can’t find “flatten” :-(. Why?
    [autocad 2015 for Mac]

  12. Jono
    February 27, 2015 at 15:32

    Hi

    Loved the macro setup. Worked well. Strange offshoot now is that when doing a distance query “Di” enter. And click click I get Distance = 1E+99 instead of the distance.

    Any ideas.

  13. Rebecca
    March 3, 2015 at 15:37

    not working in Autocad for Mac 2014-:(

  14. kix
    July 4, 2015 at 01:05

    you are a life saver *-*

  15. Farid Aboudiab
    July 10, 2015 at 23:12

    it totaly worked for acad 2015 thank u ๐Ÿ™‚

Leave a Reply