I have a similar issue I need solving.
I am creating a modified part length and trying to save in in our standard Purchased Parts folder for checking into Vault. This is an Internal Rule to the base part.
The idea is, any user can check out the base part. Modify the LENGTH. The script will automatically save the modified part with a new name.
The problem is, each user has a different hard-drive path based on their user name. This script was only for me (rprivitt), but not for other users.
Path = "C:\Users\rprivitt\Documents\Vault\$Working Folder\0-0-ENGINEERING DATA\0-0-ENGINEERING DATA\STANDARD PARTS\PURCHASED PARTS\UNISTRUT"
How can I use the equivalent of:
Path = ".\Documents\Vault\$Working Folder\0-0-ENGINEERING DATA\0-0-ENGINEERING DATA\STANDARD PARTS\PURCHASED PARTS\UNISTRUT"
This doesn't work either:
Path = ThisDoc.Path
This is the full context of the script, that only works if I am the user. I want to work for any user:
Parameter("LENGTH") = LENGTH
iProperties.Value("Summary", "Title") = "UNISTRUT " & "FASTINAL NUMBER 48322 " & LENGTH & " in."
iProperties.Value("Project", "Part Number") = "48322-" & LENGTH
Dim Path, NewFileName As String
Path = "C:\Users\rprivitt\Documents\Vault\$Working Folder\0-0-ENGINEERING DATA\0-0-ENGINEERING DATA\STANDARD PARTS\PURCHASED PARTS\UNISTRUT"
NewFileName = Path & "\" & iProperties.Value("Project", "Part Number") & ".ipt"
ThisDoc.Document.SaveAs(NewFileName, False)