4 Replies Latest reply on Jun 15, 2017 11:16 AM by Steven Mills

    Save drawing view as DXF/DWG

    Ryan Doving

      I would like to write a macro that iterates through each view in a drawing and exports them to separate DXF/DWG files. Is this possible in 2017? I don't see anything in the IView interface that would achieve this functionality. I found an entry in "What's new in 2013" that shows this is possible through the user interface, but don't know how to do it through the API.

        • Re: Save drawing view as DXF/DWG
          Deepak Gupta

          Sorry but API function is not available for this option. Please vote for  SPR #:834742

           

          Check the macro by Terry Raymond here Save view as a DXF

           

          OR

           

          You may open the model and export the DXF/DWG from there OR delete the sheet format, save sheet as DXF/DWG, then undo to restore the sheet format.

            • Re: Save drawing view as DXF/DWG
              Ryan Doving

              Thank you Deepak, Terry's approach was going to be my fallback if I couldn't directly save a view to DXF. It looks like he copies the view and pastes it on a new blank sheet, then saves the new sheet as a DXF.

               

              I have run into issues with some sketches not exporting properly when saving flat patterns directly from a part. It has been much safer to put a flat pattern view in a drawing and export from there. However, we frequently have multiple flat patterns on one drawing sheet, and I would like to export the flat patterns to separate DXF files.

               

              I voted for that SPR and will keep an eye on it, but for now Terry's macro will suffice.

            • Re: Save drawing view as DXF/DWG
              John Pesaturo

              Ryan, does it have to happen from your drawing file? The only reason I ask is that what you're looking for is there in a part file "save-as" function. I don't really do macro's but it would seem that if the operations are already present a macro should be pretty straight forward. This again of course would be just from the part model though, not the drawing file.

               

              • Re: Save drawing view as DXF/DWG
                Steven Mills

                Also you can save a multi-page PDF then use another program to separate them into different files later. Adobe editor is probably the best. Though Adolix and PDFSAM are freeware that can do the same.