Below is a simple macro to export the current drawing as a DXF file to N:\DXF. As you can see, it names the DXF "Draw1.dxf". How can I edit the macro to so the dxf filename is the same filename as the SolidWorks drawing, which is our part numbering system. Thanks in advance.
Dim swApp As Object Dim Part As Object Dim boolstatus As Boolean Dim longstatus As Long Dim Annotation As Object Dim Gtol As Object Dim DatumTag As Object Dim FeatureData As Object Dim Feature As Object Dim Component As Object Sub main()
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc Part.SaveAs2 "N:\DXF\Draw1.DXF", 0, True, False End Sub