I'm trying to create a fairly simple macro (I think) that would allow me to save a drawing in PDF and DWG and store them in the appropriate folder. So I saved the macro while saving the document, but how to indicate in the macro that it should take the name of the document to be saved and not a name already defined in the mcro (I don't know if I'm clear...)
sPathName = swModel.GetPathName' retrieves the folder name sPathName = Left(sPathName, Len(sPathName) - 7) sPathName = sPathName + ".dxf" ' Edit: add dxf at the end of the variable to save in this format (can be replaced by pdf)
@gt22: I got the macro in the link, but it saves the files in the folder where the SolidWorks drawing is located and I don't know where to modify the code to indicate my paths :-(
Personally, I don't know anything about macro creation, but when I need to do pdf and dwg exports of plan folders I use the task scheduler, there is an export function provided for this purpose. You can even program it to work at night.
On the other hand, knowing macros interests me strongly, if someone has documentation to train me, I'm interested.
In fact we have a folder where the SolidWorks drawings are recorded, a folder for the MEP in DWG and a folder for the MEP in PDF... A top organization... Laughing out loud
I tinkered with the file a little and I manage to change the path but I lose the name of the file... But I'll get there eventually :-)
By dint of tinkering and searching thanks to the GT22 link, I finally have a macro that works and allows me to save my PDF file in a certain folder and in parallel my DWG file in another folder.