Drawing connector which goes through given points

Hi,

Please, share you ideas about three following question:

  1. I have 6 point coordinates (in document coordinates) and I want that connector shape goes throught these points. How can I manage it? I did not find any information about it in documentation.

  2. I know absolute coordinates of text (absoluteX, absoluteY ) and try to convert them to local coordinates of connector shape using code:

    edgeShape.getTextXForm().getTxtPinX().setValue(absoluteX - edgeShape.getXForm().getPinX().getValue());
    edgeShape.getTextXForm().getTxtPinY().setValue(absoluteY - edgeShape.getXForm().getPinY().getValue());
    edgeShape.getTextXForm().getTxtLocPinX().setValue(0);
    edgeShape.getTextXForm().getTxtLocPinY().setValue(0);

    But it does not work how it should be. For example if I set absoluteX = 5; absoluteY=5; I expect all textes be at the same point in diagram, but it is not the case, as you can see in the folowing example project:
    ExampleProject.zip (31.3 KB)

  3. If we will look at the stencil in ExampleProject.zip, we can see that the text is placed in the middle of connector shape. Why is the text in the result (“whatIget.vsdx”) so far away from connector shape?

@iteraplan

Thanks for contacting support.

We have tested the scenario by running the project which you have shared. However, would you please share an expected .vsdx file which you want to obtain. We will investigate the scenario accordingly and share our findings with you.

@asad.ali

  1. In the second question, if my code

    edgeShape.getTextXForm().getTxtPinX().setValue(absoluteX - edgeShape.getXForm().getPinX().getValue());
    edgeShape.getTextXForm().getTxtPinY().setValue(absoluteY - edgeShape.getXForm().getPinY().getValue());
    edgeShape.getTextXForm().getTxtLocPinX().setValue(0);
    edgeShape.getTextXForm().getTxtLocPinY().setValue(0);

    is a right way to set text position using absolute coordinates, I expect result from ExampleProject.zip to be expectation1.zip (19.3 KB), where all textes are in the point x=5, y=5.

  2. In th third question, if I do not set text coordinates manually using the code above, as in ExampleProjectAutomaticTextPosition.zip (27.3 KB) I expect result to be expectation2.zip (19.2 KB), where all textes are in the middle of connectors or at least on the connectors. In the stencil text is in the middle. But my actual result instead is whatIgetHere.vsdx (is attached to project).

And what is about first question? I do not have any expectations for first question, I just do not know hot to do it.

We use version 18.10.

  1. In the thrid question, the interesting point is that when editing connectors using MS VISIO Home>Editing>Change Shape>ifdConnect it works like expected - text is displayed in the middle of connector. So the problem is similar with Text location for connector shapes, with difference that this time connectShapesViaConnectorIndex() method with added connection points was used instead of connectShapesViaConnector() with default connection points.

@iteraplan

Thanks for further elaborations.

We have tested the scenario in our environment using Aspose.Diagram for Java 19.1 and were able to notice the issues. We have logged investigations tickets in our issue tracking system as following:

DIAGRAMJAVA-50643

DIAGRAMJAVA-50644

We have tried to achieve your requirements in our environment but were unable to succeed. Hence, for detailed investigation, we have logged an investigation ticket as DIAGRAMJAVA-50642 in our issue tracking system.

We will surely look into details of all logged tickets and keep you posted with the status of their resolution. Please be patient and spare us little time.

We are sorry for the inconvenience.