1 Reply Latest reply on Jun 1, 2018 9:12 AM by Deepak Gupta

    how to create new empty sheet 2 with name DXF on drawing

    Kenneth Nielsen

      I want to create empty sheet 2 with no borders and sheet named DXF with a macro.

        • Re: how to create new empty sheet 2 with name DXF on drawing
          Deepak Gupta

          Try these, change as needed.

           

          Option Explicit
              Dim swApp                      As SldWorks.SldWorks
              Dim swModel                    As SldWorks.DrawingDoc
          Sub main()
          
              Set swApp = Application.SldWorks
              Set swModel = swApp.ActiveDoc
              swModel.NewSheet3 "DXF", swDwgPaperCsize, swDwgTemplateNone, 1#, 1#, False, "", 0#, 0#, ""
             
          End Sub
          

           

          You can add error handling like there is active drawing document, no DXF named sheet is already in the drawing, etc.