Programmatically select Diagram

Feb 7, 2013 at 5:22 AM
How can I programmatically select Diagram? IDiagramPresenter has no SelectDiagram() method.

Currently I am using IDiagramPresenter.UnselectAll() and it seems to be working, but I'm not sure it's the right way...
Feb 7, 2013 at 6:56 AM
An IDiagramPresenter (Display) alwasy displays exactly one diagram. IDiagramPresenter.UnselectAll() unselects all selected shapes.

I think you mean the DiagramSetController (which holds a set of diagrams) - but in fact, there is no way to 'select' a diagram because for the framework something like a 'selected' or 'active' diagram does not exist. You have to implement such a feature in the host application.
Feb 7, 2013 at 7:24 AM
The point is that I created custom menu item "Select Diagram" (in the Display's context menu). Clicking this menu item must "select" Display.Diagram and show its properties in the "primary" PG. Now I understand that this can be done with the following code:
this.propertyController1.SetObject(0, this.display1.Diagram);
-- this emulates "selection" of the Diagram :)
Feb 7, 2013 at 9:50 AM
Seems that I misunderstood "select diagram":
I thought of "select the display of the specified diagram and make bring it to front in the unser interface".