2

Currently I am trying to understand .vdx files, because in the future I want to generate my own. I'm having problems with dynamic connectors. When defining them as follows:

<Shape ID="46" Type="Shape" Master="10">
<Geom IX="0">
<MoveTo IX='1'></MoveTo><LineTo IX='23'></LineTo></Geom>
</Shape>
....
<Connect FromSheet="45" FromCell="BeginX" FromPart="9" ToSheet="1" ToCell="PinX" ToPart="3" /> 
<Connect FromSheet="45" FromCell="EndX" FromPart="12" ToSheet="23" ToCell="PinX" ToPart="3" /> 

they are not displayed. After moving a node, the connectors are displayed. What am I missing?

When taking the minimal settings from a Visio generated .vdx file, there are lots of coordinates, which I want to avoid:

<Shape ID="47" Type="Shape" Master="10">
<XForm>
  <PinX F="Inh">1.669258233656828</PinX> 
  <PinY F="Inh">7.519214852067909</PinY> 
  </XForm>
<XForm1D>
  <BeginX F="_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)">1.737275462308963</BeginX> 
  <BeginY F="_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)">7.671541057367827</BeginY> 
  <EndX F="_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)">1.601241005004693</EndX> 
  <EndY F="_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)">7.366888646767992</EndY> 
</XForm1D>
<Geom IX="0">
<LineTo IX="2"><X>-0.1664424255025283</X><Y>-0.3046524105998358</Y></LineTo>
</Geom>
</Shape>

What is the best and easiest way to work with dynamic connectors in .vdx files?

EDIT: With Visio 2010 it is much better, and the connectors are shown most of the time. So it really looks like a Visio bug...

Jason Plank
  • 2,336
  • 5
  • 31
  • 40
mspoerr
  • 2,680
  • 5
  • 32
  • 35

2 Answers2

1

According to Connect documentation:

In untrusted XML files, when Visio opens the file, it uses the Connect elements to set glue formulas for shapes, similar to the GlueTo method in Automation. However, geometry will not be updated, so connectors may need to be manually rerouted.

yshalbar
  • 1,455
  • 1
  • 9
  • 23
  • As far as I see, Connect works as it should - all connectors are glued to the shapes, but they are not displayed. When I do a "Shape -> Center Drawing", they are shown and. The connection points also work, because when moving a shape, the connector kees connected and is also moved. – mspoerr Oct 11 '10 at 15:56
  • I am able to reproduce this behavior, unfortunately this looks like a bug in Visio. With the existance of XForm1D, the Connects tag is reduntant and not seem to be used. With Connects tag but no XForm1D, the connection only appears when refreshing the diagram. Try to look at the export/import implemented at http://projects.gnome.org/dia/, but with Visio being the de-facto standard, I guess you will have to re-implement the Microsoft bug and create you own XForm1D – yshalbar Oct 11 '10 at 19:12
0

With Visio 2010, the connectors are displayed, so it looks like it was a bug in an earlier version of Visio.

Jason Plank
  • 2,336
  • 5
  • 31
  • 40
mspoerr
  • 2,680
  • 5
  • 32
  • 35