CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2011
    Posts
    1

    Unhappy 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

  2. #2
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    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.
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured