Hi all
I've been doing a lot of work on the forum and I can't find an answer to my question.
So, via an Excel workbook I want to manage 2 dimensions of a SolidWorks part and then save it in STEP format in a predefined destination folder.
On the other hand, I want to be able to save my part in STEP by being able to give it the name I want or if possible take the field of an Excel cell to name it.
Here's the code I use:
Sub Bouton1_QuandClic()
Set swApp = CreateObject("SldWorks.Application")
Set Part = swApp.ActiveDoc
Part.Parameter("H@Esquisse1"). SystemValue = Range("C3"). Value / 1000
Part.ClearSelection
Part.ForceRebuild
Part.Parameter("L@Esquisse1"). SystemValue = Range("C4"). Value / 1000
Part.ClearSelection
Part.ForceRebuild
' Save As
longstatus = Part.SaveAs3("C:\Users\bectarlu\OneDrive - CAMFIL AB\Desktop\Room Family\STEP_" & ActiveConfiguration & ". STEP", 0, 2)
End Sub
Thank you in advance for your help
Kind regards
Ludovic