46 Replies Latest reply on Jul 18, 2018 1:20 PM by Deepak Gupta

    Selecting a face and then clicking a macro button to create DXF

    Andrew McLean


      I'm trying to streamline some of my processes for exporting faces as DXF's. This process is time consuming and very repetitive.


      I have limited knowledge of created Solidwork Macros and now require a macro to save selected faces as DXF's and then save them in a required folder in the pathfile called "DXF'S", with a certain name. The DXF file name must gain its information from the cutlist properties and part properties in the format of "MK1-10382-010-01_5MM_MSPL_1OFF.DXF"  i.e "Project" & "Number" & "THICKNESS" & "MATERIAL" & "QTY".DXF


      Please note that the "Project" & "Number" property comes from the custom properties manager while the rest come from the cutlist properties of each solid body.


      At the moment, I model parts with multiple bodies with in it, which could have multiple thicknesses. These bodies however may not be sheet metal parts and i don't want to convert them or create configurations of each body as this takes too long and parts are quite detailed.


      What i would like is to select the faces that i want DXF's to be created and then click the macro button and then it executes each selected face a a separate DXFfile. With each DXF file is the selected face only with a scale of 1:1.


      Is someone able to help me or upload a code similar that i can manipulate. I've tried manipulating other macro codes but fail miserably at making them work as they are totally different.


      Thank you.

      Deepak Gupta