Start a new topic

Get short cut to AutodeskTC

Any idea on how to get the file shotcut in PowerJobs, that will open the file in AutodeksTC? 


ex "http://Servername/AutodeskTC/Landing?Server=Servername&Vault=Vaultname" and the path to the file? 


//Rasmus




hi Rasmus, we found this forum post https://forums.autodesk.com/t5/vault-customization/new-thinclient-url/td-p/4705095 and extracted the logic from that code. Here the few lines of code:


   

$file = Get-VaultFile -File "$/Designs/Suspension/100001.idw"
$persitentIds = $vault.KnowledgeVaultService.GetPersistentIds("FILE",@($file.Id), "Latest")
$persitentId = $persitentIds[0].TrimEnd("=")
$url = "http://localhost/AutodeskTC/localhost/Vault#/Entity/Details?id=m$($persitentId)&itemtype=File"

   

You need the PersistentId of the object. powerVault objects provide this property, but there is a bug there, so you have to get it through the Vault API. 

Tue URL uses the PersistentID with an 'm' as prefix. Also, the localhost (2 times) becomes the name of your server, and the Vault becomes the name of your Vault. In my case I have all local and standard so localhost and Vault.


hope this helps!

ciao

marco



Hi Marco, thanks it works fine! :)

Just add the vaultserver and vaultname to the url.

 

$vaultname = $vaultConnection.Vault
$vaultserver = $vaultConnection.Server
$persitentIds = $vault.KnowledgeVaultService.GetPersistentIds("FILE",@($file.Id), "Latest")
$persitentId = $persitentIds[0].TrimEnd("=")
$url = "http://$($vaultserver)/AutodeskTC/$($vaultserver)/$($vaultname)#/Entity/Details?id=m$($persitentId)&itemtype=File"

 

BR 

Rasmus 


1 person likes this
Login or Signup to post a comment