I try to make a macro that saves the active Document toedrawing file in the same original drawing path and with the samename. So I started recording it and click on file-> save as-> Choose edrawings extension and press enter but after thatwhen i used This macro I found that it saves the Active document inthe same folder as the File I used to create the macro with andwith the same name. the Code below is the result.
could any one help me with that and tell me what i have to relplacewith what to make createthe edrawing file from the active sheet inthe path of the Drawing file.
Thanks In Advanced.
'******************************************************************************
' C:\DOCUME~1\MC1C6~1.ABD\LOCALS~1\Temp\swx3912\Macro1.swb - macrorecorded on 12/21/08 by M. Abdel Moniem
'******************************************************************************
Dim swApp As Object
Dim Part As Object
Dim SelMgr As Object
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long
Dim Feature As Object
Sub main()
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
Set SelMgr = Part.SelectionManager
Part.Extension.SaveAs "D:\CAD-CAM-CAE\Solidworks\Work\test\testfile.EDRW", 0, 0, Nothing, longstatus, longwarnings
End Sub
SolidworksApi macros

could any one help me with that and tell me what i have to relplacewith what to make createthe edrawing file from the active sheet inthe path of the Drawing file.
Thanks In Advanced.
'******************************************************************************
' C:\DOCUME~1\MC1C6~1.ABD\LOCALS~1\Temp\swx3912\Macro1.swb - macrorecorded on 12/21/08 by M. Abdel Moniem
'******************************************************************************
Dim swApp As Object
Dim Part As Object
Dim SelMgr As Object
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long
Dim Feature As Object
Sub main()
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
Set SelMgr = Part.SelectionManager
Part.Extension.SaveAs "D:\CAD-CAM-CAE\Solidworks\Work\test\testfile.EDRW", 0, 0, Nothing, longstatus, longwarnings
End Sub
SolidworksApi macros