Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re-Layout Connectors automatically

7 views
Skip to first unread message

Lucas

unread,
Aug 12, 2009, 11:04:01 AM8/12/09
to
Hi!

I'm creating a Visio VDX-File outside of Visio. I get a problem when trying
to connect two shapes with a "Dynamic Connector. For example, if I want to
connect shape 1 and 2, I would create an XML-Entry like this:

<Shape ID='3' NameU='Dynamic connector' Type='Shape' Master='3'>
<Geom IX='0'>
<MoveTo IX='1'></MoveTo>
<LineTo IX='2'></LineTo>
</Geom>
</Shape>

What happens when I open the resulting file in Visio is that the connector
appears somewhere on my page, but not connecting the shapes. As soon as I
move one of the shapes, the connector "jumps" and is automatically glued to
the specified shapes.

How can I achieve that the connector is automatically glued to the specified
shapes without needing to move the shapes manually first?

Cheers,
Lucas

Hudon@discussions.microsoft.com Eric Hudon

unread,
Sep 28, 2009, 11:03:01 AM9/28/09
to
I have the same exact issue. Any answers are welcomed.

David J Parker [MVP Visio]

unread,
Sep 28, 2009, 5:33:10 PM9/28/09
to
Have you forgotten (or didn't know) that you need to have entries in the
Page/Connects ?
e.g:
<Connects>
<Connect FromSheet='3' FromCell='BeginX' FromPart='9' ToSheet='1'
ToCell='PinX' ToPart='3'/>
<Connect FromSheet='3' FromCell='EndX' FromPart='12' ToSheet='2'
ToCell='PinX' ToPart='3'/>
</Connects>
</Page>


Also, the Geom section may need actual values for the line, e.g.:

<Geom IX='0'>
<NoFill>1</NoFill>
<NoLine>0</NoLine>
<NoShow>0</NoShow>
<NoSnap>0</NoSnap>
<MoveTo IX='1'>
<X>0</X>
<Y>0</Y>
</MoveTo>
<LineTo IX='2'>
<X>0</X>
<Y>-2.36220472440945</Y>
</LineTo>
<LineTo IX='3'>
<X>2.519685039370079</X>
<Y>-2.36220472440945</Y>
</LineTo>
</Geom>

"Eric Hudon" <Eric Hu...@discussions.microsoft.com> wrote in message
news:7EA588A1-0774-49F5...@microsoft.com...

Eric Hudon

unread,
Sep 28, 2009, 6:01:01 PM9/28/09
to
I did know and did not formet about the Connects. ;)

I was able to solve my problem by marking the first goem as delete. Like this:

<Geom IX="0" Del="1">

</Geom>

Then I replaced it with my own Goem IX="0". That way now I am able to
manually route my link. Also I did have to use some DEPENDSON so Visio loads
my sparse xml file properly.


Simply have that statement:

<Shape ID='3' NameU='Dynamic connector' Type='Shape' Master='3'>
<Geom IX='0'>
<MoveTo IX='1'></MoveTo>
<LineTo IX='2'></LineTo>
</Geom>
</Shape>

Actually appends to list of row in the first Goem instead of overriding it.

0 new messages