So it was late last night, but this morning I went to the trouble of actually getting the attachments and looping through them.
I noticed that internally Solidworks stores the complete path of the file. In my head I presumed as an unlinked file is embedded I would only need the filename.
Passing in the full path seems to have fixed the issue.
Hey Rob You know I don’t understand macros, I was just wondering,
Why don’t you create them directly in the design file? (it can’t be created?)
And won’t it overwrite the old file when you want to create it again?
Hey Omur
I am still experimenting with what will work best.
I actually want to overwrite the file as it is much easier to make new than trying to modify an existing file
When you attach a file you have the option to link it or embed it.
I was hoping to embed them but have since discovered that there is no way to open them again if they are embedded.
Well you can open them from the ui - but what is actually happening is solidworks copies the file to a temp directory and opens up a copy.
With this new knowledge I am forced to link them… which makes this question moot because I could simply overwrite the existing file and solidworks would be non the wiser