I have to add PI SDK Dialogs manually everytime i open my process book (.piw file). How i configure these dialogs that they always enable in my process book.
Thanks for posting on PI Square! Sorry for the delayed response. Here is the code snippet that you'll find useful:
Set ReferencesObj = Application.VBE.ActiveVBProject.References
ReferencesObj.AddFromFile "C:\Program Files (x86)\PIPC\library\pipc32.dll"
I would also add some error catching to make sure that the reference isn't already added.
Please let me know if this is helpful and works for you.
In addition to Jesse's answer, another way to enable the PI-SDK Dialogs is by going to the Visual Studio editor and add it, along with some dependencies, manually.
From your ProcessBook display, press ALT+F11 to activate the Visual Studio editor.
Click on Tools menu, and then References... sub-menu item.
A brand-new project already have these references for you:
Scroll down to locate and enable these other references:
Textually that would be:
If you close click OK to close the References dialog, and then open it once again (Tools > References...), all enabled references will appear at the top:
And finally, the most important step is to issue a File > Save.
Note that these steps must be performed for each project (PIW or PDI file). You cannot set this globally in ProcessBook.
Retrieving data ...