Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connector list?

Status
Not open for further replies.

N1GHTEYES

Technical User
Jun 18, 2004
771
GB
I have a worksheet with a whole slew of shapes (rectangles) connected by connectors. Don't ask why, it really doesn't matter and it would take too long to explain. The key point is that it looks a bit like a family tree.

I want to be able to manually select any one rectangle, then use a subroutine to select all dependent shapes i.e. all of the shapes on that "branch" of the tree.

I could do this easily if I could find out how, in code, to list all the connectors which are connected to a particular shape and know which are "ends" and which are "starts". I assume this info is available somewhere in the object hierarchy, but I'm blowed if I can find it, and so far the "help" hasn't been very helpful.

Can anyone point me to the right object / property / collection / method or whatever?

Thanks,

Tony
 



Tony,

You're asking in the wrong forum. You ought to be in forum707 for VBA type questions.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
A shape has a .Connector property that is true if it is a connector.

Shapes that are connectors have a .ConnectorFormat object, which has a .EndConnectedShape property.

So it seems like you could get there from here.
 
Skip - yes, I realised that and thought I had almost imediately put up another post saying so and apologising. However, it does not seem to be here. Not sure why.

mint - I realise that, but it comes at the problem the wrong way. I know I can find, from a connector, which sahpe it connects to, but what I want is to find, from a shape, which connectors it has.

If I look at a shape's connector list, I can trace down a leg of the diagram in a recursive fashion, only looking at the relevant objects. If I work with the connectors themselves, I have to start by creating a list of all connectors and figure out all the shapes they connect to to know which connectors a particular shape has.

However, bearing in mind Skip's comment, see the vba forum for further discussion.

Tony
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top