connectors: FromSheet always the connector itself

M

Mr Anderson

I've got a question about connectors and its "FromSheet" and
"ToSheet"-properties. When I load a Visio-drawing, on which there are only 2
shapes connected by one connector, the "connects.count"-property is 2. The
"FromSheet"-properties of connects-item[1] and -item[2] are always the
connector itself. The "ToSheet"-properties are the 2 shapes I connected to
each other. So whats wrong?
My shapes are equipped with connection points and I always connect them from
connection point to connection point or from parent-shape to parent-shape
(with the big red frame around the whole shape). I'm developing with Delphi 7.
 
A

Al Edlund

it's not a count of connection objects, it's a count of connections (two
objects with one (active) connection a piece)
al
 
M

Mr Anderson

OK, now I understand. But in this case, when I have got a reference to the
first shape (Shapes[1]), how can I gain access to the second shape connected
to it? Does it only work like:
Shapes[1].FromConnects.Item[1].FromSheet.Connects.Item[2].ToSheet ?

There HAS to be a more comfortable and less difficult way to do it!

[Its Delphi-code, sorry, but I think you will understand it anyway]
 
M

Mr Anderson

Other question which could make it much more easily to me:

Is it correct that in a connects-collection the previous or next item of a
certain item represents the second connection of the connector, which also
owns the first connection? For example: in a Visio-drawing with no connector
only onesided glued to another shape, Document.Pages[1].Connects.Item[5] and
Item[6] or Item[11] and Item[12] are always the end-points of the same
connector. Is this statement correct?
 
A

Al Edlund

within the visio 2003 sdk there are routines that can be used to create a
connection report, and yes it can get a little complicated.
al

Mr Anderson said:
OK, now I understand. But in this case, when I have got a reference to the
first shape (Shapes[1]), how can I gain access to the second shape
connected
to it? Does it only work like:
Shapes[1].FromConnects.Item[1].FromSheet.Connects.Item[2].ToSheet ?

There HAS to be a more comfortable and less difficult way to do it!

[Its Delphi-code, sorry, but I think you will understand it anyway]

Al Edlund said:
it's not a count of connection objects, it's a count of connections (two
objects with one (active) connection a piece)
al
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top