Draw Line between 2 shapes

Hi,

I would like to know how I can draw a line between 2 shaps like this :

Position of circle and rectangle are random.
DocIo provide to append shape as line and set height, width and position origin. But I want to draw a line between 2 shapes or 2 points.

Regards

4 Replies

IN Informatique March 30, 2020 08:12 AM UTC

Hi,

Nobody to answer my question?
How about Shapes connectors in DocIO?

Regards


MR Manikandan Ravichandran Syncfusion Team March 30, 2020 05:30 PM UTC

Hi Pegasus,

Sorry for the inconvenience caused.

For your requirement with “Connect two shapes with line”, we have prepared the sample application and attached to itself. You can download the sample from the following link.
https://www.syncfusion.com/downloads/support/forum/152746/ze/ASPNetMVC-1207591912

In the sample we have done the followings.
1. Created the new word document instance.
2. Added round shape in the document in position 15 from left margin and width 50
3. Added rectangle shape in the document in the position 145 from the left margin and width 70.
4. Added line shape in between the 2 shapes in the document in the position 25 from the left margin and width 80 (start of 2nd shape – end of 1nd shape = width of the line shape).
5. Saved and closed the word document instance.

Please let me know if you have any concern on this

Regards,
Manikandan Ravichandran



IN Informatique March 31, 2020 07:50 AM UTC

Hi,

Your code works if rectangle is near on the right of the circle. But position of Both are random. it's possible that rectangle is far to the bottom left of circle.

If you want to understand my project, I have a map and place locations on this symbolise by circle. Each location got a label symbolize by the rectangle. Both are placed by user in a other application  and I place it in the word. I can place Both of them but i want to bound location and label by line. So consider locations and labels are random positions.

Regards


MR Manikandan Ravichandran Syncfusion Team April 1, 2020 05:15 PM UTC

Hi Pegasus,

Thank you for your update.

Essential DocIO is non-UI component (library product), so it not feasible to connect two shapes directly. In Microsoft Word application, you can also adjust the line position as per the desired result manually and there is no direct option to set the exact start and end position.

Please let us know if you have any other questions.

Regards,
Manikandan Ravichandran


Loader.
Up arrow icon