5 Replies Latest reply on Jan 24, 2014 2:04 AM by Deepak Gupta

    Macro to save drawing as dwg

    Sam Bromley

      Hi all,


      I have seen previous posts regarding a macro that will export a dwg to the active documents directory. The simplest I have discovered so far is a macro by Deepak Gupta titled 'DWG-Save V2' - see attached. This does a very good job in exporting the current drawing to dwg format. I would like to add some functionality to this macro, but I am scratching my head as Im not very adverse in API.


      What I would like to try and achieve is a similar macro which will allow me to save to a particular  directory (I dont save my .SLDDRW files and .DWG's in the same location). Also, when I create a part I assign a revision, part number and description to the custom properties; what I would like to do is grab these custom properties to construct the dwg file name. For example, the file name would read;


      11-5690A Chair Bar Frame - End Frame.dwg

      (Part No)(Revision)(Description).dwg


      Overwrite file warnings would also need to appear if a file with the same name exists in the directory.


      Hopefully I have explained myself clearly and that perhaps half of the work has been done with Deepak's existing macro.


      Anyone got any ideas of code I would need to insert into the macro?