Open Autocad with a Solidworks macro

Hi all

I would like to know if it is possible to create ONE single macro that allows me to save a SolidWorks drawing under .dwg and open it in Autocad?

Please let me know if this is feasible and if so, a little help would be welcome;)

Hello

To save an SLDDRW plan in DWG, you can find what you need in the macro proposed here.

To open the DWG thus created, you should be able to draw inspiration from the code below, changing the name of the app and the name of the file of course:

Dim objShell
Set objShell = CreateObject("shell.application")
Dim Monappli As String
Monappli = "notepad.exe"
Dim Monfichier As Variant
Monfichier = "C:\Monfichier.txt"
objShell.ShellExecute Monappli, Monfichier, "", "open", 1
Set objShell = Nothing

Kind regards

3 Likes

Great thank you for your answer this should help me, I'll try it tomorrow!!