The icons on a Visio stencil represent what’s formally known as Master Shapes. For example, when you drag a shape representing a server onto a page and place it into a rack, a copy of the Master is placed in the drawing’s Document Stencil which you can’t see (more on that in a bit), and what appears on the page is an Instance of the shape. An Instance is a pointer to the shape in the Document Stencil, kind of like a copy. So, if you place a dozen servers in your rack elevation, you will have a dozen pointers back to the one shape in your Document Stencil. This is one way that Visio actually keeps the file size down and performance up.
You can see the Document Stencil by selecting File > Shapes > Show Document Stencil. It looks like a regular Visio stencil but it contains only the shapes that you have placed in your drawing. However, if you delete all of the Instances of a shape, such as those 12 servers in your rack, there will still be a server shape in your Document Stencil. In other words, the Document Stencil maintains a stock of every shape that you have placed in your drawing even if you’ve deleted them all from the pages.
Over time, a Visio file may become bloated especially if it has been worked on and modified frequently. Let’s say you’re changing out the equipment in your rack and you delete all of those servers and replace them with patch panels, routers, and other stuff. The server shape will still be on your Document Stencil as will all of those patch panels, routers, and other stuff. The next time the rack is provisioned, that stuff may be deleted but the shapes are still in the Document Stencil. Get the picture here? It’s like an attic that accumulates junk that you no longer use in your house.
So the file size grows and grows even though there’s not much in the drawing. The best thing to do is clean out the “unused Masters” from your drawing. Visio 2007 has an easy way to do this. Select File > Remove Hidden Information and then the File Size Reduction tab. Checking the “Remove unused master shapes” box will clean the Document Stencil and reduce the file size.
In the example below, there are just two equipment racks in the drawing but the file size is a whopping 2 MB! The Remove Hidden Information box shows 103 unused master shapes. Although this is just a sample drawing to illustrate the point, it’s not unusual for a drawing that’s been used for years to have over a hundred unused masters. After cleaning them out, the file size shrinks to 200 KB… quite a difference.
© 2009 – 2010, Visimation. All rights reserved.
Hey… I didn’t see the + Share/Save button. Awesome. I think you’ll see great results from this.
Is there anything like this for Visio 2000 files?
Visio 2000 does not include a tool to remove unused masters. However, you can download one that we developed for free here:
http://www.shapesource.com/scripts/prodView.asp?idproduct=21
That version is for Visio 2002 but I beleive it works for 2000 as well. It’s been along time since we used Visio 2000 so I’m not entirely certain it will work but you can try it and uninstall it if it does not.
I tried the clean option on a 96Mg file and it only reduced the file to 94Meg, not very effective!
Hi AL,
If the file contains many “unused masters”, this technique should be effective. However, if the .vsd or .vsdx large file size is due to it containing many inserted images, you will not see much difference.