Hello,
i would like to save a drawing as pdf in a folder where the path for the Folder is linked to the name of the file.
For example. the Filename is E853028569 then it should be pasted in C:\\dhf-pdf\\853\\02\\Filename.pdf
Can someone tell me how i could write a code for such a logic or provide me a code.
Thanks in advance.
SolidworksApi macros
There many such macros on this forum, search and you should be able to find one.
You'll want to manipulate the string of the file name. Search through the forums or even on google for VBA string manipulation (substring, left, right, mid, split, etc.). From there, you can create the directory from the VBA code to get the folder structure you're looking for. I've done all of this in c# (System.IO.Directory.CreateDirectory) but I don't know about the VBA syntax of the same functions.
MkDir to create a directory in VBA