Landing page, link to file in vault?

Landing page, link to file in vault?

Anonymous
Not applicable
2,385 Views
7 Replies
Message 1 of 8

Landing page, link to file in vault?

Anonymous
Not applicable

Is it possible to put a link on the landing page that will open a file from the vault ?

If so, how do i get the url to the file ?

0 Likes
2,386 Views
7 Replies
Replies (7)
Message 2 of 8

wayne.brill
Collaborator
Collaborator

Hi,

 

I am not sure I understand your requirement but it seems similar to the functionality provided by ACR files.

 

Here is an excerpt from a case I had recently:

>> >>
The behavior you’re trying to implement is similar to the Send Link command in Vault Explorer and sounds almost identical to the Copy Hyperlink command. The command works by generating a URL to a specific web service method on the Vault Server that creates an ACR file. It’s a custom file format that is registered to be opened using the Vault Explorer. When the thick client opens an ACR file, it will ask the user to authenticate and then redirect the view to select the entity specified in the ACR file.

 

You can get an ACR file by using the File->Send->Send Link… command in Vault Explorer and send an email to yourself or use the Edit->Copy Hyperlink command and paste the resulting hyperlink in to a web browser if you’d like to examine one. There is probably very little documentation about generating the URLs or the ACR files themselves because they are *not* part of the publicly supported SDK. You could potentially try to generate these URLs yourself, but because they are unsupported for third party use, you could be on your own for any future issues resulting from generating these URLs yourself. Unfortunately, these Vault Explorer links and the ACR files don’t work for folders or custom objects. Currently, they can only be created for files, change orders, and items.
<< <<

 

Thanks,

Wayne

 

 



Wayne Brill
Developer Technical Services
Autodesk Developer Network

Message 3 of 8

cesar.hernandez
Contributor
Contributor

Hi Wayne,

 

How do you go about editing the EntityDataCommandRequest.acr file that is generated by vault upon the change state that sends a link in an email? I am looking to change the server name (as shown in the code below) within the file to point to a different vault. 

 

<?xml version="1.0" encoding="utf-8"?>
<ADM xmlns="http://schemas.autodesk.com/msd/plm/ExplorerAutomation/2004-11-01">
  <Server>Vault02</Server> <--- Have this point to a different server
  <Vault>Company Vault</Vault>
  <Operations>
    <Operation ObjectType="File">
      <ObjectID>$/Engineering Data/Production Drawings/XXXXXX-LOGIC.dwg</ObjectID>
      <Command>Select</Command>
    </Operation>
  </Operations>
</ADM>

Thank you,

Cesar

0 Likes
Message 4 of 8

ReneRepina
Collaborator
Collaborator

Hello!

Is it possible to use command "Open" (or similiar one) and open it directly in Invetor via Vault?

0 Likes
Message 5 of 8

dave_taylor
Advocate
Advocate

This is how I get the URLs for both thick and thin client in powershell/Data Standard. You can probably look at the logic and go from there. It shouldn't be much different with using direct Vault APIs.

 

 

$VaultDB = "Vault"
$fileFirst = $files | select -First 1
$persistantID_tip =  $vault.KnowledgeVaultService.GetPersistentIds('FILE',$fileFirst.id,0)
$persistantID_tip = $persistantID_tip.TrimEnd('=')
$serverUrl = New-Object System.uri($vault.AdminService.Url)
$filePath = $fileFirst."Full Path"
$filePathUrl = $filePath.Replace("$","%24").Replace("/","%2f").Replace(" ","+")
$fileUrlThick = $serverUrl.Scheme+"://"+$serverUrl.Host+ "/AutodeskDM/Services/EntityDataCommandRequest.aspx?Vault=$($VaultDB)&ObjectId=$($filePathUrl)&ObjectType=File&Command=Select"
$fileUrlThin = $serverUrl.Scheme+"://"+$serverUrl.Host+ "/AutodeskTC/"+$serverUrl.Host+ "/$($VaultDB)#/Entity/Details?id=m$($persistantID_tip)&itemtype=File"

 


Dave Taylor
MCAD Solutions Engineer
Hagerman & Co.


Autodesk Certified Instructor - Platinum



*Likes to this post are appreciated if the information I have shared is helpful to you and/or others...
**Did this resolve your issue? Please accept it "As a Solution" so others may benefit from it.
Message 6 of 8

ReneRepina
Collaborator
Collaborator

@dave_taylor

We already have links to files. The question was, if we can open it in Inventor, not just select in Vault. I tried open command, but it does not work, because it probably needs some reference to open with something (Inventor).

 

Just for the info, I see that you have replace "/" with "%2f". When second first option is used, it opens in current opened Vault, if the second option is used, it opens a new one. Not sure if this works OK?

0 Likes
Message 7 of 8

dave_taylor
Advocate
Advocate
The / replacement was so that the url is compatible with formatting. I have found sometimes if using the "/" in the path in older versions, it was not finding the file when opening with the acr shortcut that gets created.

Do you mean with the "/" in the URL it opens in the current vault, but with the "%2f", it opens in a new instance? In 2022, it opens the same either way...unless you are using an older version.

Dave Taylor
MCAD Solutions Engineer
Hagerman & Co.


Autodesk Certified Instructor - Platinum



*Likes to this post are appreciated if the information I have shared is helpful to you and/or others...
**Did this resolve your issue? Please accept it "As a Solution" so others may benefit from it.
0 Likes
Message 8 of 8

ReneRepina
Collaborator
Collaborator

@dave_taylor 

Sorry for late reply.

 

Comments:

  1. If link is used with "/", it opens it in current Vault.
  2. If link is used with "%2f", it opens in a new instance of a Vault.
  3. We are using Vault 2020.3.6 and Inventor 2020.4.3.
  4. My question still stands, if we can use somesort of link command to open file directly in Inventor.
0 Likes