Information between two equipments connected

Apr 17, 2013 at 1:03 AM
Thank you very much Kurt. The project is progressing well. Now I need to learn how in the event ShapeInserted when I insert a line to communicate two equipments, I can know the identification of each ones and the points connected together, programmatically. These data are obtained by selecting with the right mouse button on the Connection line(Info shapes). These data need to obtain programatically. I tried in several ways, analyzing source programs and attached Documentation without results.
            Best regards.
Apr 17, 2013 at 1:38 PM
Please take a look at the code snippets in this topic - they can give you the idea of how we can get connections details programmatically.
Apr 17, 2013 at 9:08 PM
                 thanks for your help, but I'm actually trying to get information from the equipment link with a line, from the information on that line. This is obtained using at least two of the sample programs DataBase Designer and Designer, when I select a line with the mouse right button which displays a list where I can select Shape Info and displays the form  Shape Info where is the information  need. This  Info Shape form has been developed in Dataweb.NShape.WinFormsUI, and from there I have obtained the necessary instructions for the connection information of each equipment, but I can not do it, programmatically, from a line. If you have another idea , please send me. Thanks.
Apr 18, 2013 at 1:11 AM
Kurt and Comanche : the instructions obtained from Dataweb.NShape.WinFormsUI, function correctly, but only in the event ShapeSelected. This means that data can be obtained which equipments are connected to the selected line. But I'd rather get that information when I connect the line with the mouse and the ShapeInserted event is fired. Is posible?. Best Regards.
Apr 19, 2013 at 6:57 AM
First of all, I have to point out that the Display.ShapesInserted is only fired when a shapes are inserted into the current diagram of the display. You cannot detect new shapes that are inserted into diagrams that are not displayed.
But there is a better way to detect such changes:
The IRepository interface provides (beside many others) the following events:
event EventHandler<RepositoryShapesEventArgs> ShapesInserted;
event EventHandler<RepositoryShapesEventArgs> ShapesUpdated;
event EventHandler<RepositoryShapesEventArgs> ShapesDeleted;
event EventHandler<RepositoryShapeConnectionEventArgs> ConnectionInserted;
event EventHandler<RepositoryShapeConnectionEventArgs> ConnectionDeleted;
project1.Repository.ConnectionInserted += repository_ConnectionInserted;