Owning object scenario 2
- Last UpdatedJan 31, 2025
- 2 minute read
You need to monitor and maintain connection to several different data acquisition servers, but don't want to keep all server property windows open at all times. You can use ShowGraphic() with the OwningObject feature to switch back and forth between server status displays using a single interface element (pushbutton).
You can use the following script for the purpose:
Dim graphicInfo as aaGraphic.GraphicInfo;
graphicInfo.Identity = "Display_" + cp2;
graphicInfo.GraphicName = "DDESL";
graphicInfo.OwningObject = cp2;
ShowGraphic( graphicInfo );
Where cp2 = "DDESLTest_001", "DDESLTest_002", and DDESL is the Visualization folder graphic. DDESLTest_001 DDESLTest_001 are the automation object instances.
At run time, click the ShowGraphicDDESL pushbutton to open the graphic. You can change DDESLTest_001 to DDESLTest_002 to switch between the two graphics, as illustrated in the following sequence.

Displaying server DDESL Test_001:

Switched to display DDESL Test_002 using the configured button:
