MeraSatoshi@mdis

PI Batchview How to generate and process VB code from custom web application?

Discussion created by MeraSatoshi@mdis on Oct 28, 2013
Latest reply on Oct 28, 2013 by MeraSatoshi@mdis

Currently we are programming web application that will change the PI Batchview display’s condition.

 

PI ProcessBook 3.3

 

PI Batchview 3.1.5.0

 

 

 

We successfully created changing code in PI ProcessBook. but we want to run it from web application.

 

VB Code is following.

 

Code start-

 

    Dim myTrendDef As BatchTrendDef

 

    ' Get the query definition from the BatchGroup
        Set myTrendDef = BatchGroup1.Trends(1).GetDefinition

 

        Set myQuery = myTrendDef.Query

 

        ' Change the query
        myQuery.IDtest = "*215994"

 

        myTrendDef.Query = myQuery

 

        ' Set the definition containing the new query back
        Call BatchGroup1.SetDefinition(myTrendDef)

 

-Code End-

 

 

 

We want to use this code from web application.

 

Currently the code has myQuery.IDtest = "*215994" part but we want to set IDtest as variable.
(We want to set different ID for each time from Web Application)

 

So Web Application has to generate VBcode and process the VBcode in PIProcessBook display.

 

Is it possible?

 

If it is possible, please let me know how to do.

 

Thank you.

Outcomes