Hi,
I'm trying to draw a link between two objects with a report.
I don't know how I can create a link that has a more complex shape than a straight line through scripting.
My report has to change the type of all the connexions in a model, without changing the aspect of the objects in the model, including the aspects of the links, just the type of the links has to be replaced by another type.
So , I'm just going through all the connexions in the model, getting the source object X and Y coordinates , the Target object X and Y coordinates and then connecting the objects with the other link with these coordinates.
The problem is that , if in the original model, there is a link with more than one corner, the report will change all the links to the type I defined, but the aspect won't be the same as the original.
I attached an example where I draw 3 objects and links between them that I don't know how to reproduce through script.
If some can help, I'll appreciate.
Thank you
Salut Jordan,
if it were not for your example image I would say: create new connections and then generate the model layout through the script API.
Maybe you can find the necessary methods in the SAG standard script "Replace object types". Look for "mappedconnections" and ocxnocc.Model().CreateCxnOcc(....). It seems that you can re-use the ocxnocc.PointList() in order to copy the connection shape while replacing the type.
Regards, Martin