Bruno, what kind of specific information are you looking to pass between your two ProcessBooks? Are these two ProcessBook .PIW files, or two independent display .PDI files?
I'm looking for PDI to another PDI, two independent display. The information can be a text box or something that I can use in VBA !
Through VBA you still have access to the automation model so you can do anything you like as if you are dealing with your current display (aka ThisDisplay object).
Example, if you have two displays - display1.pdi and display2.pdi - and there is a Value symbol on Display1 that you want to access from Display2 then you could do something as simple as:
Dim d As Display Set d = Application.Displays.Open("C:\Apps\Display1.pdi", True) Debug.Print d.Symbols("Value1").GetValue("*", Null)
Of course you can access public variables from VBA code, other complex symbols etc.
1 of 1 people found this helpful
Considering that the display source is already open.
Private Sub Display_DataUpdate()
Dim D As Display
On Error GoTo Msg1
Set D = Application.Displays("SOURCE") ‘Display where the value to be copied
A = D.Symbols("VALUE_1").GetValue("*",Null) ‘Dataset 1
B = D.Symbols("VALOR_2").GetValue("*", Null) ‘Dataset 2
C = A + B
ThisDisplay.TEXT1.Contents = C
E = D.Symbols("VALOR_3").Contents 'Textbox
ThisDisplay.TEXT2.Contents = E
MsgBox ("Open the display SOURCE") 'If display SOURCE isn't open