Divide a dynamic connector into 2 parts and add text
Hi,
I am programming in Visual Basic 6.5 to do some specialized things in Visio.
After much frustration, I now paste this problem to you guys:
What I've done.
-There are two rectangles with custom properties.
-There is a dynamic connector connecting these two rectangles.
-Now I run a macro on this connector to receive the information about the two rectangles. (very useful for creating cable lists).
Here's the problem:
Often, I cannot have this line running across my drawing because it is messy and just undesirable. So, I split this line going from rectangle 1 to 2, into two lines. Where the first line connects to rectangle 1 only, and the second line connects to rectangle 2 only.
Finally, the line connected to rectangle 1 should have its text say the description of rectangle 2, and vice versa. This is so that the reader knows where these split up connectors are going, while keeping everything neat.
This "split up" and typing I want to automate, and is driving me crazy.
Any recommendations to do this easily would be apprecaited. Any new or pre-existing code would be great.
Even some guidelines to go about this problem would be excellent.
Thanks and Cheers,
Hamzah
Re: Divide a dynamic connector into 2 parts and add text
I'd find the corners, and do some math to try a path to see if there are collisions, and if so, add the third connection.