In Modeler, we can create elements and link them by drag. However, I want to implement those operations by code.
For example, it will create and display a rectangle(rect1) when I first click a button. Then when I click the button again, it will create and display another rectangle(rect2) and link the two rectangles (rec1->rect2).
Is there any methods to implement the operation. Can someone help, Thanks!!!