Visio removing UML model info when saving file

3

I had created a .vsd file in Visio Premium 2010, saved it, emailed a copy to my colleague. Couple of days later, I reopen it, only to find that for some reason, it no longer treats the the document as a UML template-based document.

As a result of this, I cannot do any edits on the file. Any ideas as to why the UML info gets discarded?

Is there any workaround so that I can edit the file? How can I make Visio think into believing the file is based on the UML template?

Note:

  • Copy + paste from the existing file to a new one is not practical because there are 18+ tabs and Visio seems to discard all names and other meta-data information on pasting.
  • I've created a new diagram using the "Create New From Existing.." dialog, doesn't help, it's still the same issue.

Sathyajith Bhat

Posted 2011-08-25T12:07:25.113

Reputation: 58 436

Answers

1

As to how to repair the association and re-link objects to the UML template I am not certain and sadly do not have access to Visio at the moment to try anything out, but if the line-art is intact but simply not editable you should at least be able to recover the artwork, if not the references.

You may be able to select the entire drawing, right click it, and under the Shapes menu you should see an option to Ungroup. This should at least break the file down into lines and shapes that are editable.

I would recommend doing this on a copy of your original file, keeping the original safe in case it can be recovered.

When using a template Ungroup-ing should usually give a warning that it will break references to the template.

Does anyone else have access to the file, could they have modified it in any way? Visio does have an option to remove hidden data and if someone went into the document, hit that button and selected the "Remove these items..." it looks like it also breaks the links to template and stencil files. I've shown the dialog from Visio 2007 below, I would expect similar in 2010.

enter image description here

Mokubai

Posted 2011-08-25T12:07:25.113

Reputation: 64 434

1

I would strongly recommend against the ungrouping technique suggested above. That's almost always a bad idea for shapes from Visio stencils. You're likely to lose all of most of the crucial data in the shapes.

If you click File>Info, what is listed to the right of "Template" on the right side of the screen? Does it say "UML Model Diagram", something else or nothing?

What happens if you create a simple one page UML diagram and repeat the same steps, i.e., close it than open it again later?

Scott Helmers

Posted 2011-08-25T12:07:25.113

Reputation: 11

Template says "UMLMOD_M.vst". Other files seem to open fine – Sathyajith Bhat – 2011-08-26T04:22:26.490

If you create and save a new UML document, does the template name on the Info page also show "UMLMOD_M.vst" or does it display "UML Model Diagram". I ask because with Visio 2010, I see the latter and am curious that your doc shows the former. – Scott Helmers – 2011-08-26T14:46:37.977

One more thought. As you pointed out in your question, copying all of the pages in your doc to a new doc is too cumbersome. However, Paul Herber's Visio Super Utilities can do that for you. Try http://www.sandrila.co.uk/visio-utilities/ You can use it 30 times for free. If the problem is a broken template association, this might solve the problem.

– Scott Helmers – 2011-08-26T14:50:54.587

If I create and save new UML document, it does show "UML Model Diagram". The existing file is causing problems. Thanks for the link to Super Utilities, I'll check it out. – Sathyajith Bhat – 2011-08-26T15:13:15.953

Here's another option: Save the drawing in Visio's XML format; the result is a text file, albeit a very large text file (at least 4-5X the size of the VSD).

Open the XML file in Notepad and search for "template". The first occurrence should contain: C:\Program Files\Microsoft Office\Office14\visio content\1033\UMLMOD_U.VST

If it doesn't, set it to that value (note: "Program Files" might need to be "Program Files (x86)" depending on the bit-ness of Windows and Office). Save the changes to the text file.

Open the VDX file in Visio. If all is now good, resave as VSD. – Scott Helmers – 2011-08-26T16:32:22.720

Saving to XML format showed that the template was pointing to the wrong file - updated it to the correct path,saved and opened the VDX, resaved it as VSD. Now, Properties shuw "UML Model Diagram" but still the error message comes and I'm back at status quo – Sathyajith Bhat – 2011-08-29T12:34:29.873