I'm looking for a PDM add-in that will allow me to create and paste a hyperlink into Excel that will open PDF file from the vault. I found one (SWPDM2017_CopyShortcut_Addin.cex) but this just takes me to the vault folder, it doesn't open the file.
Not familiar with that add-in but I know that a hyperlink to a document in a vault has a keyword like Explore. I think it wold need to be Open instead to accomplish what you want.
Have a look here: https://forum.solidworks.com/message/950593
Check this: Get hyperlink to a file in SOLIDWORKS PDM vault (conisio url)
Thanks for the replies but I'm not a programmer and I'm not sure what to do with this information. I was looking for something like this, SWPDM2017_CopyShortcut_Addin.cex, that I could just drop in. There must be something there already because my PDM email notifications send me the link.
You don't have to be a programmer if you have a newer version of PDM (I think maybe 2018 or later), but it will take an extra step to have the link open the file. A command "Copy Link" was added to the context menu. This will put a link to the file on the clipboard. Below is an example of the hyperlink contents.
Once you have pasted this into your spreadsheet you will need to replace explore with open.
Another possibility is to open the file directly via the complete file name. To do this, this code has to be inserted into the VBAProject in the spreadsheet containing the file names. If a cell with a valid filename in the vault is clicked, this file will be opened.
' Add a reference to the PDMWorks Enterprise xxx Type LibraryOption Explicit'The column in which the HyperLink is writtenConst hCN = 1'The vault nameConst vN = "<vault name>"Private Sub Worksheet_SelectionChange(ByVal Cell As Range) Dim v As EdmVault5 Dim s As Object Dim f As IEdmFile5 On Error GoTo eH Application.ScreenUpdating = False 'Checks whether the clicked cell meets the requirements If Cell.Column = hCN And VarType(Cell.Value) = vbString Then 'Login into the vault Set v = New EdmVault5 If Not v.IsLoggedIn Then v.LoginAuto vN, Application.Hwnd If Not v.IsLoggedIn Then MsgBox "Cannot login into vault '" & vN & "'", vbCritical GoTo eH End If End If 'Gets the file object from the vault Set f = v.GetFileFromPath(Cell.Value) 'Checks whether the file object could be fetched from the vault If f Is Nothing Then MsgBox "File '" & Cell.Value & "' not found.", vbCritical GoTo eH End If 'Gets the file in the latest version from the vault 'Caution, the local version will be overwritten f.GetFileCopy Application.Hwnd, 0 'Opens the file with the assigned application Set s = CreateObject("Shell.Application") s.Open Cell.Value End IfeH: Application.ScreenUpdating = TrueEnd Sub
Retrieving data ...