file path of vault file

file path of vault file

Anonymous
Not applicable
1,254 Views
4 Replies
Message 1 of 5

file path of vault file

Anonymous
Not applicable

I'm programming in C# in vault 2018. What I need is the path of a file in Vault. I searched the net but can't find a code snippet of it.

 

I vault I can see Path = $/Myworkfolder/InventorTestProject  , but how can I find this path in code ? I don't want to download the file, just open it.

 

Can anyone help ?

 

 

0 Likes
1,255 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable

never mind, found it 🙂

0 Likes
Message 3 of 5

danijel.radenkovic
Collaborator
Collaborator

@Anonymous wrote:

never mind, found it 🙂


Hello @Anonymous,

I have the same problem, finding a Vault path of the specific file in Vault. Would you like to provide a way how you did it?

 

Best,

Danijel

 

Inventor 2018/Windows 10 x64
If this information was helpful, please consider marking it as an Accepted Solution by using the Accept as Solution. Kudos are also gladly accepted.
0 Likes
Message 4 of 5

Anonymous
Not applicable

I am sorry, but it can't remember for what project I needed this, it has been too long ago.

But I am sure I found it on google somewhere.

 

Message 5 of 5

Tim_Kreutzer
Advocate
Advocate

What information do you have to identify the file? Its name? The DocumentService class has a GetLatestFilePathsByNames method.

 

FilePathArray filePathArray = WebServiceManagerObject.DocumentService.GetLatestFilePathsByNames(new string[] { "MyFileName.ext" });
string MyVaultPath = filePathArray.FilePaths[0].Path;

(written off the top of my head, may not be accurate)

 

Beside that, there is FindFilesBySearchConditions()

0 Likes