3 Replies Latest reply on May 7, 2010 11:17 AM by andreas

    Transfer selected module from one pdi page to another


      I need some idea here.


      Im now doing the automated PB graphic using module database. Every time user click on the Available Modules such as Well Name. The tags indide the graphic will change accordingly. Those tags i receive from alias and property.


      I have an automated graphic using the MDB. One of the automated graphic have link to another automated graphic. To connect to B graphic, i have a button in A graphic. The problem is, when user click the Well Name (at Available Modules) at A graphic then how can i transfer the same selected Well Name in graphic A to be selected in Available Modules in graphic B.


      How to select the same Well Name in graphic A to graphic B?


      Example: if i select the BRC platform on Graphic A then i click the button MPFM, at the graphic B should also select BRC.


      Graphic A




      Graphic B



          • Re: Transfer selected module from one pdi page to another

            Thanks, i will try to use that one. i read that post before. i just not sure whether my problem its same.



              • Re: Transfer selected module from one pdi page to another

                here is a stripped down code that simply passes the context down:

                ' This will hold the absolute path to the display,
                ' exluding fileame
                Dim myPath As String

                ' Get the path from this display, excluding filename
                myPath = ThisDisplay.Path
                myPath = Left(myPath, InStrRev(myPath, "\", -1, vbTextCompare))

                ' Get the current display
                Dim myParentDisplay As Display
                Set myParentDisplay = ThisDisplay

                ' The Contexthandlers
                Dim MrdContextHandler As ContextHandler
                Set MrdContextHandler = Application.ContextHandlers("ModuleContext")
                Dim AliasContextHandler As ContextHandler
                Set AliasContextHandler = Application.ContextHandlers("Alias")
                Dim PropContextHandler As ContextHandler
                Set PropContextHandler = Application.ContextHandlers("Property")

                ' This will be the Child Display
                Dim myChildDisplay As Display
                ' Open the Childdisplay
                Set myChildDisplay = Application.Displays.Open(myPath & "ChildDisplay.PDI", True)

                ' Set all three contexthandlers to have thesame context in Child and Parent
                MrdContextHandler.CurrentContext(myChildDisplay) = _
                AliasContextHandler.CurrentContext(myChildDisplay) = _
                PropContextHandler.CurrentContext(myChildDisplay) = _