tags:

views:

42

answers:

1

Hello,

currently I try to understand vdx files, because in future I want to generate my own. I now have problems with dynamic connectors. When defining them like 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?

Thanks,
/mspoerr

A: 

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