Data Standard, Vault, modify CreateFile function to select folder in which file is created

Data Standard, Vault, modify CreateFile function to select folder in which file is created

cdellea
Enthusiast Enthusiast
376 Views
2 Replies
Message 1 of 3

Data Standard, Vault, modify CreateFile function to select folder in which file is created

cdellea
Enthusiast
Enthusiast

Is it possible to modify the CreateFile function (CreateFile.ps1 and addinVault\Default.ps1) in Vault (right click on a Vault folder) to specify another folder where to create the file ?

 

Have done all modification that allow to select / create the wanted folder. But file is still created in the selected folder before the command is launched.

 

In my code, I set $Prop["_FilePath"].Value with the Vault folder in which I want the file to be created. But this is not working.

 

Thank you very much in advance for your help.

 

Colin

0 Likes
Accepted solutions (1)
377 Views
2 Replies
Replies (2)
Message 2 of 3

Markus.Koechl
Autodesk
Autodesk
Accepted solution

There is a default function prepared to implement customizations: Create a customization copy of the Default.ps1 file in .\Vault.Custom\addinVault\ and implement the logic you need in this pre-defined function:

# This function can be used to force a specific folder when using "New Standard File" or "New Standard Folder" functions.
# If an empty string is returned the selected folder is used
# ! Do not remove the function
function GetParentFolderName
{
	$folderName = ""
	return $folderName
}


Markus Koechl

Solutions Engineer PDM, Autodesk Central Europe
0 Likes
Message 3 of 3

cdellea
Enthusiast
Enthusiast

Hi Markus,

 

That was as simple as that. Works like a charm.

 

Thank you very much !

0 Likes