5 Replies Latest reply on Oct 16, 2015 5:39 AM by Tuomas Tiainen

    Automating DXF creation

    Tuomas Tiainen

      swsurfs.png

      I work at a company, where we sometimes manufacture stuff by sectioning the shape and sending the sections somewhere to be cut out, after which we join the them together and smooth it  by sanding.

      Sending the cross-sections to be cut requires converting them to DXF. I normally have them in the part as surface bodies (as in the picture) and have to right-click on each of them and select the "Export to DXF/DWG" option. This can be done in a reasonable time for up to, say 50 cross-sections, but as the numbers go up the probability of error increases as does the time to do the job.

       

      I am looking to create either:
      a) a batch script to save all the surface bodies of a part as DXFfiles

      b) some other tool/macro to only save the selected/clicked surface as a DXF, without giving the user need to click more than once.

       

      I have some progamming experience in C, C++ and Python, but have never used the Solidworks API. At my university, I have used Creo to do some similar scripting, and if it was Creo, I would know where to start looking (Creo writes a trail file for all actions).

       

      Can you point me to the right direction to start looking from? What tools would be needed for such a script?

      I would also be interested to hear of already existing tools or ways to solve the problem.