4

I develop a tool which works with process diagrams. I need to write an export feature for the tool, that will save current process in Visio VDX format.

I found that Visio saves shapes coordinates in a kind of format which is not easy to understand. For example: PinX 1.476377952755906; PinY 9.448818897637793

My tool operates with shapes and connectors on a discrete net, where coordinates starts from 0,0 and can be only integer, equal or more than zero.

So the question is, how to represent Visio coordinates in VDX file in more understandable format, like millimeters for example.

Dan.

Daniil Belonin
  • 373
  • 1
  • 9
  • 19

1 Answers1

4

By default, those coordinates in the VDX are inches. Visio internally uses inches for units.

You can specify the units explicitly. For example to set the width of a shape to 100 millimeters:

<Width F="100mm">

To test this out I created a VDX file and used millimeters for both height and width formulas and can confirm that Visio 2007 will correctly understand how to read and use these units.

You may notice that the VDX generated by Visio includes the result but not the formula. For example with the PinY cell you will see ...

<PinY>3.309830932</PinY>

Visio will not accept units in the values for results. This means you can't put "100mm" inside the tag. The solution is to remove the result value and use the F attribute for the formula. Below is an example.

<PinY F="10mm"></PinY>
saveenr
  • 8,439
  • 3
  • 19
  • 20
  • All right. But let's say that I'm quite satisfied with default width/height for now. But how to deal with X,Y: 4.52755905511811 8.759842519685039 – Daniil Belonin Jul 07 '11 at 01:22
  • 1
    I updated the answer to include how to handle the PinX and PinY values: simply use the *F* attribute instead of the final result value. – saveenr Jul 07 '11 at 02:11
  • By the way, where can I find all possible acronyms for size value. What should I write to put a size in centimeters, inches, pixels etc. – Daniil Belonin Jul 08 '11 at 00:58
  • 1
    The following page on MSDN should provide all the units you can use in a formula http://msdn.microsoft.com/en-us/library/aa342176(v=office.12).aspx – saveenr Jul 08 '11 at 23:33