1 of 1 people found this helpful
If you want to do this here are the steps (the code should be present in all displays for this type of "extended ERD" functionality to work:
1. Each display will have to contain the name of the PDI to open, this should be a value symbol coming from PI AF
2. Hook on to the ContextChanged event, compare the current PDIName with the one in the new context path. If they are the same, don't do anything (just let the normal ERD functionality take its course).
3. If they're not the same: Store the new context path in a "global" parameter, and open the new display.
4. In the Display_Open event handler you should check for other open displays. If there is another open display, try locating the mentioned "global" parameter from that and read the context value. (Application.Displays is numbered ascendingly, so the current display's index is Application.Displays.Count, and the previous one would be "-1") .Apply this context in your current display.
5. After that, close the previous display. We only allow one display open at a time, to keep things tidy - and make sure we don't look for the old context in the wrong display.
We've used this successfully for a few years. The downside is that it'll take a bit more time for a navigation operation to complete, and it'll include a couple of "flashing displays" (which actually is Display_Activate and Display_Deactivate happening for each of the two displays). But on the positive side you'll actually be able to use the ERD menu to navigate between different displays.
(Techsupport is aware of this method, and is able to assist you with the details. Maybe even provide a set of example displays for you to start from. I'd suggest contacting them asking for this solution)
Thanks Asle for an awesome solution! James, there is no out-of-the-box way to accomplish what you are looking for, you'll have to build it with VBA. If you are interested, you can also look at KB00425 for an example on how to handle a context change in an element relative display.