2 Replies Latest reply on Jan 27, 2009 2:43 PM by mweiss

    Registry errors when trying to use PBObjlib reference


      I'm attempting to develop a C# program which would allow a user to select a directory containing processbook displays and automatically add them to a selected processbook workbook.




      I'm getting what looks to be a registry error when trying to define an entry object to add to workbook.


      PBObjLib.Entry theEntry = new PBObjLib.Entry();


      With the error:  Retrieving the COM class factory for component with CLSID {3b810F85-F689-11CF-9E3D-00AA003DE8D7} failed due to the following error: 80040154.


      Any ideas?

        • Re: Registry errors when trying to use PBObjlib reference

          [Administration Note: This thread was moved under the "ProcessBook and Microsoft Office Development" forum.]

          • Re: Registry errors when trying to use PBObjlib reference

            No objects in the ProcessBook automation model should be created with the new keyword other than the Application object. To create a new entry you'll need to call the Procbook.Entries.Add. ProcessBook will create a new Entry for you as the return value of the Add.


            The Entry will be a text label initially. To change the entry to a link to a PDI call Entry.DefineAction. See the help topics on this method. One tricky part is the type parameter. See the help for the Entry.Type property for the correct values. If you're using ProcessBook 3.1 you can use the enumerated type pbEntryinkType in place of hardcoded numbers.




            While not C#, here is a VBA macro example:


            Sub test()

            Dim book As ProcBook
            Dim ent1 As Entry
            Dim ent2 As Entry
            Set book = Application.ProcBooks(1)

            Set ent1 = book.Entries.Add("embedded")
            ent1.DefineAction pbEntryLinkType.pbEntryPDIEmbeddedInLocalPIW, "", ""

            Set ent2 = book.Entries.Add("link")
            ent2.DefineAction pbEntryLinkType.pbEntryLinkedPDI, "C:\pbfiles\mydisplay.pdi", ""

            End Sub