3 Replies Latest reply on Nov 21, 2013 3:11 PM by Gregor

    Processbook external links and relative paths.

    Matt Caesar

      I'm having issues with a workbook that has links to external displays. I need to be able to get the relative path from display when it was created but I can't seem to find it anywhere. I'm aware of the "Use relative path before absolute path" option, but I'm trying to read the actual path value and not open the external display.The reason is the file is moved and the external display is not available at the time it's opened.

       

      The Entry.Action field always contains the full path. Is there any solution to this?

       

       

        • Re: Processbook external links and relative paths.
          Matt Caesar

          Just wanted to add that this statement from the PI ProcessBook VBA Language Reference seems completely false.

           

          "The Action property, which is read-only, reads the Action string of the entry. It will return

           

          either the relative or absolute path depending on the option that was selected when the entry

           

          was defined. To explicitly get either form of path, set the flags on the entry using the Options

           

          property, get the Action, and then restore the flags."

           

          This is exactly what I need but doesn't work at all. I always get the absolute path.

            • Re: Processbook external links and relative paths.
              dhollebeek

              Please report this to customer support.  It gets a higher priority if it comes from a customer than it does if I write it up internally.

               

              Thanks,

               

              :D

                • Re: Processbook external links and relative paths.

                  Hello Matt,

                   

                  I believe with "Workbook" you are referring to a ProcessBook (extension PIW), right?

                   

                  Back in 2007, I was dealing with a case where links on ProcessBook buttons had become broken. There was a ProcessBook update from 2.35 to 3.0 involved but I am not sure anymore what had caused links to break. However, the ProcessBook file was huge with a few hundreds of buttons. We used Excel VBA to read the links behind buttons, stored the links uniquely inside Excel. The second step was manually complementing "old" links with "new" ones to create a "old" to "new" conversion table. The next step was running another VBA script that was replacing links inside the ProcessBook using the conversion table.

                   

                  I am attaching a version of the Excel 2003 Workbook and a manual that briefly describes the issue and the usage. You will need to modify the code in order to read from ProcessBook labels. Please look into properties other than Type for object pbBook.Entries(i). pbBook is declared as ProcBook and the Entries property allows you to iterate through the Entries.

                   

                  If you decide to call OSIsoft Technical Support as suggested by David, you may want to refer to call # 190231.