- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi Everyone
I'm working on a bit of code, that will "SaveAs" when Partnumber or Title is updated in iProperties. The purpose is to make a kind of seemless transition from part/assembly files with temporary worktitles, to our companys more consistent filenaming-scheme with PartNumber_Title. Ideally in time, I'd like this function to also update the partfile's dependants and then delete the original file with the worktitle, but for now I'm just just focusing on the first part, and most of the code is working just fine.
I call the current filename with the ThisDoc.FileName(False) and compare it to the new filename that is PartNumber, "_" and Title concatenated. If they're not the same, the ThisDoc.Document.SaveAs will run with the new filename. I can get it to work, but only if I also add the path into the beginning of the new filename. So the new file ends up being named: "the folder that its in""PartNumber"_"Title". If I don't add the path, the function doesn't work, I get an error and no new file is created.
So is this just the nature of the ThisDoc.Document.SaveAs command, or is there a way to use it without the path in the new filename?
Cheers - Anders
Solved! Go to Solution.