35 Replies Latest reply on Jun 28, 2016 7:35 AM by Nikki Egleton

    Read Vault from Other Software

    Todd Bohlen
      Ok, this will be confusing, so bear with me.

      We have an MRP system (PO's, Inventory, Project BOMs, all our part numbers, shipping, receiving - all that stuff). Anyway, this MRP system will store a hyperlink to specific documents. Here's a hypothetical example: Part 3 is a highly proprietary hose clamp that we're famous for - people pay LOTS of money for them. (We don't actually make hose clamps - we make subseas control systems - remember, I'm using a hypothetical example). The hyperlink will open a drawing of that hose clamp. Or we have Document 9, which is a coating spec. The hyperlink will open that word document (or a PDF of it).

      Regardless, the hyperlinks are tied to a vault program that we have (not PDMW or PDMWE). The MRP will actually get into the vault and pull out the document (or the document PDF - it seems that you can get either, but they're read only here).

      The hyperlink is for a read only, viewable, printable "copy" of what is in the vault.

      Can we ditch the current vault, move everything to PDMW and let our MRP do the same thing - read into the PDMW vault and give a viewable, printable document? Our current MRP system is written on an Access database, if that makes any difference. Perhaps PDMW can automatically generate a PDF for all documents checked in and let those PDFs be read by our MRP?

      Toss in some ideas please! I'm going to try to convince the bosses to dump an extra vault that we pay a lot of money for every quarter - we still use PDMW for SW files, but everything else goes into the other vault.

      Thanks!
        • Read Vault from Other Software
          Todd Bohlen
          Wow...I would have expected SOMEONE to say SOMETHING here....

            • Read Vault from Other Software
              Joy Garon
              Hi Todd -

              I think the reason you did not get an instant answer is that nobody had an easy answer :-)
              You did not mention the name of the MRP system or whether or not it had an open API, etc.
              There is no 'out-of-the-box' way to configure a link between your MRP system and PDM vault, however, the level of difficulty in accomplishing this is hard to determine.
              My first sugesstion would be to discuss with your VAR and if they lack the expertise contact a solution partner such as Inflow, Razorleaf or XPLM.

              Good luck -
                • Read Vault from Other Software
                  Todd Bohlen
                  Instant? I waited 2 days!!!! Well, a day and a half anyway, but almost 2 days!

                  But thanks for your post!

                  Anyway, the system we use isn't anything to mention...it's all written in a Microsoft Access database, which means its pretty well wide open for programming. But I'd rather just use a hyperlink.

                  The MRP system has a place for Part 57, and the description says it is a hubcap, and here's the hyperlink to the drawing....you click and a PDF opens up. That's all we want to do with it - open a PDF. From the Vault. Or at least from somewhere maybe linked to the Vault - can the vault create and dump a PDF to a specified folder that we can do our hyperlinking from?

                  Wow...horrible grammar on my part - I ended sentences with prepositions...

                  Anyway, thanks again for any help you are able to provide.
              • Read Vault from Other Software
                Jeff Sweeney
                You can add hyperlink to look into the vault without any programming. The only catch is that the file needs to be in the local cache.

                Most of my posts go unanswered as well. I've learned not to get upset with people who try to give you help for free.
                  • Read Vault from Other Software
                    Rodney Hall
                    Upon vault check in of a part event you could have a macro save a (.pdf) copy out to a read only location for released files on your network. Then your MRP points to or looks for the file in that location instead of the vault. This would mean that you will need to insure that no check in happens without running the macro, else your copied files won't match the vault. I am publishing copies like this now without a macro, but requires dilignence on my part and all other vault users to insure this happens.
                      • Read Vault from Other Software
                        Todd Bohlen

                        Rodney Hall wrote:

                         

                        Upon vault check in of a part event you could have a macro save a (.pdf) copy out to a read only location for released files on your network. Then your MRP points to or looks for the file in that location instead of the vault. This would mean that you will need to insure that no check in happens without running the macro, else your copied files won't match the vault. I am publishing copies like this now without a macro, but requires dilignence on my part and all other vault users to insure this happens.

                        Yeah, I was thinking of doing it exactly this way (but didn't really want to). Another company's vault program publishes PDFs automatically to a folder outside the vault...the previous drafting/IT regime really dropped LOTS of balls when they were here - like this workstation - great for solitaire when I first started, now its almost capable of opening SW files on a regular basis...
                          • Read Vault from Other Software
                            Eric Martin
                            OK here is what I do.

                            We have Syteline MRP PDMWE 2007.5
                            Through a pdmwe addin in written in VB

                            When a file reaches the released for production workflow (Any type file, doc, xls, txt, image, cad ect...) A pdf of that file is generated. The pdf file gets the part name and type of file. (If the file was 104321.slddrw then the PDF gets named 104321slddrw.pdf. This is the same for any file type) A directory is created on a shared drive based on the file name. (If the share is e:\pdfs and the file was 104321.slddrw a directory gets created in the e:\pdfs directory called 104321 so I now have e:\pdfs\104321) The file is moved to a shared directory. If the directory all ready exists then it just moves the file to the directory. This way I could have multiple pdfs of a part that might have the same name but different file types. Like 104slddrw.pdf, 104xls.pdf, 104sldprt.pdf... If a pdf exist then it is overwritten with the newer pdf.

                            In syteline a user would go to any screen that has a part#. I will refer to item master for easy reference. In item master if the user hits the ctrl key and the = key (ctrl/=) then a explorer window pops up in the proper directory and the user can click on the pdf they are looking for. So if I wanted a xls spreadsheet of item 104123 then when I hit ctrl/= I would select the pdf 104123xls.pdf when explorer opens up in the e:\pdfs\104123 directory.

                            We are now developing a way so that if it is a assembly when the pdf is created the pdf will have hyperlinks to all the major parts within the assembly. (This is gonna take some time but it is the next goal. We can manually create them now but we are trying to automate in through a workflow now)
                              • Read Vault from Other Software
                                Christina Seay
                                It seems as though there should be a way to make a hyperlink to a file in the PDMWE vault.

                                When PDMWE sends an email notification about a file at various stages in the workflow, the email has a hyperlink to open the file in solidworks, a button to open the file in E-Drawings, and a button to open the folder in the vault that the file is in and highlights the file.

                                If you do a "right-click --> view source" on the email, you'll see that the link to open the file in solidworks is (for one of our files):

                                 

                                --a href="conisio://Astec/open?projectid=300&documentid=887">Astec\FB\FB20066\FB20066D02.SLDDRW--

                                Somehow, we should be able to connect to the database and retrieve the projectid and documentid for a particular file....

                                Anyone have any thoughts??
                          • Read Vault from Other Software
                            Todd Bohlen

                            Jeff Sweeney wrote:

                             

                            You can add hyperlink to look into the vault without any programming. The only catch is that the file needs to be in the local cache.



                            Most of my posts go unanswered as well. I've learned not to get upset with people who try to give you help for free.

                            What do you mean "local cache"?

                            And I don't think anyone was upset
                          • Read Vault from Other Software
                            Jeff Sweeney
                            Something like this? file:///c:/The%20Guy.jpg

                            This would open a file named "The Guy.jpg" on my c:\ in a browser.
                            • Read Vault from Other Software
                              Christina Seay
                              Jeff:
                              Yeah.. the problem with files in the vault though is that the only path to them that I can find to them is something like:
                              C:/Documents and Settings/cseay/Desktop/Vault/Folder/filename.slddrw
                              The problem with that is that it only works if the file is in your local cache, it doesn't actually open the file in the vault.

                              Andreas:
                              I am 100% ok with programming... but I can't find any documentation that explains the PDMWE API. I think there are apparently some files regarding API on the install disk in the support folder, but I can't get IT to send me those files... grrrr.... I googled that API call, and I couldn't find any more details about it.

                              Can you possibly explain a little more how to use it to retrieve the ID of the returned file and parent folder objects?
                              • Read Vault from Other Software
                                Jeff Sweeney
                                The API help file is named "API_GB.chm", pretty sure it is put in your Enterprise installation directory by default.
                                • Read Vault from Other Software
                                  Christina Seay
                                  Jeff,

                                  I'll see if I can't convince the IT department to send it to me. I'm in charge of setting up and maintaining PDM Enterprise in our Engineering Dept, but I don't have access to where Enterprise was installed on the Network... fun fun...

                                  Thanks for your help!
                                  • Read Vault from Other Software
                                    Christina Seay
                                    Well.... FINALLY got the API documentation from IT.... I've got the GetFileFromPath thing working fine... I'm connecting to the file in the vault, and reading all kinds of information about it... them problem now is that I can't find anything on how to OPEN the file that I've found... and with all the information that I was able to retrieve from the file, none of it was the documentID or projectID that I could use to generate a link to open the file...

                                    Any thoughts on how to open this file in SolidWorks now that I've found it?
                                    • Read Vault from Other Software
                                      Michael Dekoning
                                      Christina,

                                      You may want to look at IEdmBatchLinkConvert. It sounds like it may do what you want, but the documentation states that you should contact your reseller for more information about this advanced feature. I've never tried it myself.

                                      Mike
                                      • Read Vault from Other Software
                                        Jeff Sweeney
                                        Okay...I must admit this thread is getting confusing! I am no longer sure what you are trying to accomplish.

                                        However if you have the file path and name and you are using API, not sure what the advantages is to using a hyperlink. Can't you use the OPEN method of your application?
                                          • Read Vault from Other Software
                                            Christina Seay
                                            Mike,

                                            Thanks... I'll check into that and see what I can do with it.


                                            Jeff,
                                            I totally agree! It is very confusing and I barely know what I'm trying to do anymore! Short Version: We're writing a program to batch plot all the files in a given assembly... we need to be able to open the file saved in the vault with our program so that we can print it. We're printing SolidWorks files in Silent Mode... solidworks has to be open, but you don't have to actually open the individual files, so much faster. The problem is that we can OPEN the file that is saved in the vault.

                                            I can use the Open method in SolidWorks... but I can't tell it WHAT to open. The only path I can give it for the file that I want to open is the local path:

                                             

                                            C:/Documents and Settings/USERNAME/Desktop/VAULT NAME/FOLDER NAME/FILE NAME.slddrw

                                            This local path only works if the user has a copy of the file in their local cache... it's not actually reading the current file in the vault. There are several problems with this... for us, the user may never have checked out the file to have a copy on their local cache... The copy in their local cache may not be the most recent... If we wrote the program to copy files to their local cache automatically, we'd be putting a lot of junk on the user's computer since our

                                            Since I'm basically needing a path to the file so that I can open it... I did a view source on the instant notifications that PDM sends via the workflow where it puts a link that you can click on to open the file... which is what I need... a path that I can use to open files saved in the vault. The path it uses to generate the link capability is:

                                             

                                            conisio://Astec/open?projectid=300&documentid=887

                                            So it would make sense to me that if I can find a way to retrieve the projectid and documentid of the file I want to open, then I can generate a file path to the file in question and I can then open it via SolidWorks Open method.

                                            Does that make a little more sense?? Or less sense?? Or no sense at all??

                                            If anyone has a better method to retrieve the actual path to a file so I can tell a program to open "THIS" file in solidworks... I'm all ears... I can't find anything...

                                            I talked with my VAR, they have no idea... I got a help ticket into SolidWorks... I looked through the entire API guide for SolidWorks and PDM.. and I can't find anything that tells about how to retrieve a file path to the file IN the vault and not the file in the local cache.
                                          • Read Vault from Other Software
                                            Jeff Sweeney
                                            First...I don't like people putting their vault views in the Documents and Settings...cause then everyone's local cache is in a different location....but you are not outta luck, you can find the location via:

                                            objFolder = objVault.RootFolder
                                            strFileName = objFolder.LocalPath

                                            If you are afraid the user does not have the file in the local cache use:
                                            objFile.GetFileCopy(0.0#, 0.0#, objFolder.ID, EdmGetFlag.EdmGet_Simple)
                                            • Read Vault from Other Software
                                              Christina Seay
                                              They are installing the vault views on the user's Desktop... per the VAR's suggestion... it makes sure that everyone's views are on their desktops, and we can build the local file paths fairly easily within VB.net because we can grab the currently logged in windows user and insert that name into the path to get the local path to the vault.

                                              If I do the
                                              objFile.GetFileCopy ... doesn't that copy the file to the local cache?

                                              I considered that.. but when we're batch plotting from the top-level assembly down, that list of files can literally be 100's of files at one time getting copied over to the local cache. Of those 100's of files, only maybe 4-5 will be new files that the user will have checked out and some point and will have a local copy of them. I guess I could clear the local cache at the end of the program possibly.. but I would need to only clear those files copied via the program from the local cache, not clear the entire cache.

                                              It just seems like it would be sooooo much simpler to just retrieve the documentid and projectid for the file and insert them into the file path:
                                              conisio://VAULT NAME/open?projectid=300&documentid=887
                                              and then just be able to work with the file as normal from there.

                                              Our VAR is ModernTech... moderntechmech.com .. and they don't seem to know much of anything beyond initial setup and VERY simple customization. Their "PDM guy" doesn't know anything at all about API with PDM, and he admitted as much! I've gotten more help from these forums than from them.

                                              • Read Vault from Other Software
                                                Jeff Sweeney
                                                The file has to come down to the local cache. A normal user cannot access the vault directly.

                                                You may clear the cache on a file by file basis -you don't have to clear the entire vault view. Perhaps the steps should be copy the file to the cache, open/print it, then remove the file from the cache?

                                                Still haven't sold me on the idea to put the local cache on the desktop.
                                                  • Read Vault from Other Software
                                                    Christina Seay
                                                    Lol... I'm not sold on the idea of the view being on the desktop either, but since that's what the VAR recommended, and I knew absolutely nothing about PDM at the time, so I didn't know any better, that's how it was set up. For that matter, I'm supposed to get it all set up and running and I still know nothing about PDM, they still haven't sent me to the training class!!

                                                    I thought that about the file coming down to the local cache too.. and if I have to go that route, the "copy, open, print and delete" method would be best.

                                                    I'm not so sure about not being able to open a file directly from the vault though.

                                                    We have the email notifications set up to go to Outlook instead of PDM's notification system... and like I mentioned before, it's making a link to open the file by creating a database path by calling the database "conisio://" then calling the vault.. in our case "Astec/"... and then command for opening a file "open?" and then the document's projectid in the database "projectid=297&" the document's documentid "documentid=923" so it's
                                                    "conisio://Astec/open?projectid=297&documentid=923"

                                                    I've seen other things used instead of open? In the same email, you'll see it doing the same thing on the buttons, but with "view" when it's opening the file in EDrawings... and "explore" when it's opening the folder in the vault that the file is in.... "properties" when it's showing the properties of the file... and "history" when it's showing the history of the file.

                                                    If you have your PDM setup to send email notification, just right click in the email and click view source, and you'll see that bit of code in there.

                                                    I tested it, and it is calling the file from the vault directly. I grabbed that path from an email notification for a file that I had checked into the vault and ran through the workflow so it'd send a notification. I then sent that path to another person here that had never even looked at the file that I created, so they wouldn't have it on their local cache... he then copy/pasted that path into his windows explorer address bar and it opened the file in solidworks from the vault. It opens it read only since it's not checked out... but it does open it from the vault and not the local cache.

                                                    What's tripping me up is finding that projectid and documentid for a given file. I don't have access to the sql database, so I can't see what information is there that I could possibly query the database for to get the projectid and documentid of the file.

                                                      • Read Vault from Other Software
                                                        Andreas Stroem
                                                        Christina,
                                                        I'm afraid you are mistaken, "open" opens the file from the local cache. It first makes sure there is a local copy though. Also note that I think it will open the file in it's associated application, so you can't really be sure it's opened in the same application on all clients/setups.

                                                        Regards,
                                                        Andreas
                                                          • Read Vault from Other Software
                                                            Christina Seay
                                                            Jeff,

                                                            I do a lot of website programming in my side business, so when I saw that link in the email, I viewed the source code to see how it was made... sneaky sneaky...

                                                            Yup... I do know the full path and file name of the file. For this particular application, creating a Batch Plotting Routine, I'm exporting a customized PDM BOM to a CSV file and importing that CSV file into the Plot Program and printing from a column in it.

                                                            Any idea how we go from the full path and file name to the file object to the folder/project object to somehow getting to the documentid and projectid??? Or better yet... I think what's tripping me up on following exactly what you're talking about for how to achieve this... do you know WHAT the documentid and projectid of a file are in relation to the file... IDs of folders, ... ? I'm still getting lost in PDM terminology... objects, IDs, etc.



                                                            Andreas,
                                                            when you are using that link that I mentioned:
                                                            conisio://VAULT NAME/open?projectid=300&documentid=887
                                                            It is opening the vault copy of the file in whatever default program the user's computer is set up to handle that file type, it is not opening the file from their local cache. In my case, it's SolidWorks files. When they paste that link into their Windows Explorer Address bar, if they have SolidWorks on their computer, it's opening a SolidWorks Drawing. If they don't have SolidWorks, but they do have EDrawings, Open will open it in EDrawings. Like I said.. try it yourself. Take one of the instant notifications you receive from PDM... do a view source, copy that link from the source code... it'll look something like:

                                                             

                                                            PATH TO THE FILE DISPLAYED HERE

                                                            Open up windows explorer and paste that link into the address bar and click GO... and it'll open that file in whatever program you have defaulted to handle that file type on your computer. Give that link to someone else that hasn't ever even looked at that file in the vault before and let them do the same thing, and it'll open it on their computer.


                                                      • Read Vault from Other Software
                                                        Jeff Sweeney
                                                        Sweet! I did not know that!

                                                        Do you know the full path and file name of the file?
                                                        Given the file name, you can get the file object with "GetFileFromPath".
                                                        Given the path, you can get the folder/project object with "GetFolderFromPath".

                                                        Once you have these objects, their IDs are simply their properties.
                                                        • Read Vault from Other Software
                                                          Christina Seay
                                                          Grrr... I just can't seem to put this together. I got the PDM Add-In Template that Jeff Cope has on his blog:
                                                          http://extensiblecad.com/words...omagically-delicious/

                                                          And in it, it's displaying the ID's for the files that you have selected... the same ID's that I'm trying to get.

                                                          I've been trying all week to rework this program so that it gives you the ID of a file and it's parent folder's ID by giving it the file path and I just can't seem to get it to work. I think this is exactly what you were talking about Jeff with the GetFileFromPath and GetFolderFromPath... but I can't seem to get it to work. I've been through the API and I found those commands, but I've got to be doing something wrong.

                                                          Any chance you can point me in the right direction on this one?
                                                            • Read Vault from Other Software
                                                              Christina Seay
                                                              Ok.. here's what I did and it works... keeping in mind that this is running on a PDM add-in button and you would to change the vault name in the conisio link to your vault name and the path to the file and folder to your file and folder.

                                                              Public Sub OnCmd(ByRef poCmd As EdmLib.EdmCmd, ByRef ppoData As System.Array) Implements EdmLib.IEdmAddIn5.OnCmd

                                                              'Check the command ID to make sure it is our command that was called.
                                                              If poCmd.mlCmdID = 1002 Then
                                                              Dim rootfolder As String = ""
                                                              Dim vault As EdmVault5
                                                              Dim folderPath As String = ""
                                                              vault = New EdmVault5
                                                              vault.LoginAuto("Astec", 1)


                                                              Dim folder As IEdmFolder5
                                                              Dim file As IEdmFile5

                                                              folder = vault.GetFolderFromPath(vault.RootFolderPath + "YOUR FOLDER PATH")
                                                              file = vault.GetFileFromPath(vault.RootFolderPath + "YOUR FILE PATH")

                                                              If folder Is Nothing Or file Is Nothing Then
                                                              MsgBox("The folder or file wasn't found.")
                                                              Else
                                                              Dim tmpfolder As String
                                                              Dim tmpfile As String
                                                              tmpfolder = folder.ID
                                                              tmpfile = file.ID


                                                              Dim oShell As Object
                                                              Dim iResponse As Integer
                                                              oShell = CreateObject("Wscript.Shell")

                                                              iResponse = MsgBox("Would you like to open " + folder.Name + " in EDrawings?", vbYesNo, "Open File")

                                                              If iResponse = vbYes Then
                                                              oShell.Run("conisio://YOUR VAULT NAME/view?projectid=" + tmpfolder + "&documentid=" + tmpfile)
                                                              Else
                                                              Exit Sub
                                                              End If



                                                              End If



                                                              End If

                                                              End Sub
                                                                • Read Vault from Other Software
                                                                  Gene Mercer
                                                                  Christina,

                                                                  For batch plotting or PDF creation I'd suggest reading up on the dispatch add-in. It's not enabled by default, (it's in the installation folders for PDMWE) but does allow a few basic directory commands and I've heard of others having some success with it. We currently are using some of it (automatic check-in, renaming files) in our current project.

                                                                  As for getting at PDM data, we are currently working towards using excel spreadsheets to extract information right out of the vault using SQL statements (MS Query). I think I saw in another post where you were looking for a 'database map' if you've found one or created one, I'd love a copy for myself! So far we are pulling dates from PDMWE and Workflow states to do some date tracking and comparisons. Of course to do this you need direct access to the SQL server where PDMWE is installed (depends on your IT dept)

                                                                  Good luck,
                                                                  Gene
                                                              • Read Vault from Other Software
                                                                Christina Seay
                                                                I've been working with dispatch some already. I have found that it's not that much more difficult in general to write PDMWE Add-ins and you have more control over them and they're easier to edit. I started with Dispatch as a good place to begin and used it to do some automatic checking in of files as well as using it to automatically generate a Word check-list form whenever a top-level assembly is checked into the vault.

                                                                I've kind of hit a brick wall when it comes to anything using SQL statements because of our IT department here. They don't want anyone having access to the database, even via a read-only account, except for them. So I'm having to find ways around it to do what I'm trying to do.
                                                                  • Read Vault from Other Software
                                                                    Joy Garon
                                                                    Christina -

                                                                    I have an idea - ask the IT group to provide you with a standalone PC (not connected to the network) on wich you can setup a 'sandbox' environment that you have complete control over. You can install your own SQL Server/EPDM setup and test to your hearts content without impacting the organization. (in much the same manner I work on my PC).

                                                                    Joy
                                                                  • Read Vault from Other Software
                                                                    Christina Seay
                                                                    Joy -

                                                                    I've already got 3 computers at my desk. Our in-house programs for AutoCAD haven't been update yet to be able work with a version of Microsoft Office newer than 2000... And we just started working with DriveWorks that required Office 2002+... so I have one computer/monitor/keyboard/mouse for working with AutoCAD and releasing things to the shop and one complete computer setup for working with SolidWorks, PDM, DriveWorks, and VB... and I bring my laptop from home so that I have my Adobe Software for working on developing our departmental website.

                                                                    Both PC's are connected to the network and have to be... and my laptop, since it's my personal computer, can't be connected to network.

                                                                    I honestly don't have enough desk space for a 4th computer... lol... but it was a good thought ;o)
                                                                    • Read Vault from Other Software
                                                                      Jeff Sweeney
                                                                      Virtual machines?
                                                                      • Read Vault from Other Software
                                                                        Christina Seay
                                                                        Nope... not virtual machines.. IT said they'd run too slow... I have 2 full desktop computers at my desk plus my personal laptop... it's crazy!
                                                                        • Re: Read Vault from Other Software
                                                                          Nikki Egleton

                                                                          I recently found an article about linking to the vault that touched on Getting and using project and document IDs:

                                                                           

                                                                          EPDM Tech Tip: Hyperlinking to Documents in the Vault

                                                                           

                                                                          It said something about getting the EPDM Administrator to add the ID column to your views using the Admin tool.  Then when you view the vault, you will see both IDs.

                                                                           

                                                                          I'm not sure if this will be any easier for you.

                                                                           

                                                                          Good luck

                                                                           

                                                                          -Nikki