0
votes

I want to save my Visio shapes as an .svg file to incorporate into a XML document. However, when i save it ALL the values in my shape are set to 0. I've quadruple checked the shape data and all the values are there and the formulas are returning the correct values. The strange thing is, saving as a .svg works in Visio 2007 and all values are correct, but in Visio 2010 all the values are 0. Why is this? Unfortunately this is my first post, so I can't add screenshots as i don't have 10 rep.

The shape is 4 individual rows grouped together. The data is stored in the "Main" shape, i.e all rows grouped together. The cell in the individual shape then references its value from the main shape.

Example of 1 of the 4 main shape row forumlas:

ShapeData Property - Value = Sheet.1!Prop.Row_2 (references main shape rows, stores value)

Text Field Property - Value = Prop.Row_1 (references its single row, containing value of main shape)

The real kick here is I fixed this problem 4 months ago, but my colleagues had more shapes with the same issue. I cannot remember how i fixed it, and the shape that I fixed is identical in terms of structure and data handling.

Something strange that I also noticed is that when i type ".Value" after the Value field text in either the Text Fields or Shape Data properties, the ".Value" gets automatically omitted after I press enter, but then the field produces the right .svg output. However, this does not work when I make that change in the master shape. So effectively, I'd have to go into every single value field and manually type ".Value" and press enter for it to work. I've also tried turning off all shape protection, no joy.

I'm currently in the process of writing a macro to "refresh" all the value fields by adding ".Value" after them to mimic me manually typing that in.

Any help or feedback would be greatly appreciated!

2

2 Answers

0
votes

I believe this is upgrade issue (2007->2010). Have seen this a few times. To fix try:

  • Open the diagram in Visio 2003 (or 2007), but not in Visio 2010
  • Save it as .VDX (Visio XML Drawing) file
  • Close it
  • Open the VDX file again in the same Visio
  • Save it back as normal VSD file. This should fix the broken VSD file.
  • Delete the VDX file, it is not needed

If this doesn't work then try sharing the source file (dropbox or whatever).

0
votes

The problem was that the rows Text Fields were Data Object types. When I removed the Text shape protection and inserted a Shape Data field, the correct values were shown on the .svg output file.