3 Replies Latest reply on Feb 24, 2016 5:36 PM by skwan

    How to create new Element using PIOLEDBENT?

    QasimGulzar

      I am trying to transfer data of PI Syetm from one instance to other uisng PIOLEDBENT, I have restriction that I can't use any interface application for that is there any way to do that. please guide me how I can proceed, my task is to create new elements programmatic-ally and bind tag to it.

       

      In other words I want to write data to asset framework.

       

      Sorry for bad communication skills

        • Re: How to create new Element using PIOLEDBENT?
          gregor

          Hello Qasim,

           

          I am afraid what you are asking for is not possible because PI OLEDB Enterprise is read-only.

          • Re: How to create new Element using PIOLEDBENT?
            Asle Frantzen

            The only two data access products able to edit PI AF elements would be the PI AF SDK and the PI WebAPI.

             

            You can use the AF SDK in a Visual Studio project and create a small application which can traverse through the source database and recreate it in the destination database. The AF SDK can also be used in PowerShell scripts, if you don't have access to or knowledge of how to code in Visual Studio.

             

            AF SDK documentation: Overview

             

            It's also possible to edit your AF database using PI WebAPI. It's probably not suited for your needs in this situation though.

             

             

             

            Why don't you just export your database from PI System Explorer->Library->Right click the database and choose Export, and then do the same procedure to import it again in the new PI System? If you need to script it for some reason you can use the executable called AFExport.exe, located in the PIPC\AF folder. That works the same way as in PSE.

            4 of 4 people found this helpful