Every once in a while we hear from a user who has encountered a cryptic error message in Visio and is left helpless. Most of Visio’s error messages are somewhat explanatory, though we continue to improve their wording. However, there is another set of messages that report “internal errors”.
Internal errors are usually problems where the Visio program has done something wrong, whereas other errors are shown in response to things the user has done. Internal errors can be identified by an error number included within the message text. Often the message provides no clue as to the problem or possible remedies. We’ll look at one of the more frequently encountered internal error messages in this post – Error #318.
Error #318 can occur when you copy and paste a shape from one document to another. There are some specific circumstances needed to trigger the error:
This is not the only way to encounter this error, but it is representative of what can happen. Here are the steps to reproduce the problem:
The problem for Visio is the secondary reference in the Document Shapesheet to another cell. Normally when a shape moves between documents, Visio automatically copies over the page and document cells that the shape depends on – creating them if necessary. Visio sees that the shape being copied has a reference to cell User.Test1 in the Document Shapesheet, and it creates this cell in the target document. Visio does not know that the contents of cell User.Test1 themselves have a reference to another cell. Cell User.Test2 is not created in the target document. When Visio tries to complete the Paste operation and recalculates the cells, it finds that there is a missing reference. Error #318 is shown and the Paste operation fails.
Unfortunately this is no simple bug in Visio but a significant architectural limitation, which means that a fix for the problem is not forthcoming. However, by understanding how this error can occur we can identify some remedies. In order for the Paste operation to succeed, the target document must have the correct set of Document Shapesheet cells in place. It is certainly possible to add the required cells prior to doing the Paste. Another option is to make sure the shape has a direct reference to each of the Document Shapesheet cells itself. This might be a solution for shape and solution designers to use so that their users don’t experience strange Copy / Paste failures.
If you encounter internal Visio errors, please tell us about it. We’ll try to explain a few other common ones in a future post.
What a dumb ass article. This is clearly a serious bug in Visio and MicroSoft just walks away from the problem with "no fix" option.
The explainations refer to things like "Drawing Explorer" but when I click on the "View" tab, nothing is named "Drawing Explorer" and I'm left stuck with a drawing that can't be used. I guess the real solution is to dump Microsoft and use something better. This is way to expensive a piece of software to have this kind of issue and no fix to be provided.
These are "instructions"?? You have to be kidding me!!!
that occurs then there are object in visio on which Function set to value and function is not exists (horizontal panel). So just check the Function value for each object in ShapeData window
The article was posted in 2006, but I'm using Visio 2010 and still have this problem. It's incredibly frustrating that Microsoft hasn't resolved this maddening issue. My visio files are useless if I cannot copy/paste them as images. Very disappointed at no fix.
I just followed these instructions. Difficult to follow given that in Visio 2010 cell references cannot use a . (period), and other little inconsistencies like that. However, I persevered. Which has left me with ????? How is this fixing the problem with my document?
I have had this error due to a broken reference to a master shape. The shape I created was not fully ungrouped before I started to modify it. Later I changed the master shape, erasing something from it, particularly a part that was referenced in the new shape. So when trying to ungroup the new shape completely, Visio complained. Conclusion: before making new shapes, always make sure they're not connected to master shapes anymore and ungroup completely.
This is a crazy flaw that still drives Visio users crazy! Amazing that you can get an error just trying to copy! Please fix this Microsoft!
I just came across this error whilst trying to copy pages from a number of visio files into one.
Managed to resolve this by selecting each object type individually and trying to copy to identify the shape causing the problem.
Then once identified, i just dragged that shape from the stencil onto the page, deleted the shape iadded and can now copy the original shapes no problem. Only had to do this to one of the open files but can copy from all the open files, since doing the above.
The shapes and stencils however are some we have been using for two years and never had the issue before - weird
try my macro it changed in DocumentSheet user-defined cells which contained formula like Pages[Page-1]!sheet.1!user.row_1 according value
Dim cl As Row
Dim n As Integer
n = 0
Dim row_name$, row_value$, row_prompt$, new_prompt$, bl As Boolean
For i = ActiveWindow.Shape.RowCount(242) - 1 To 0 Step -1
row_name = Application.ActiveWindow.Shape.CellsSRC(visSectionUser, i, visUserValue).RowNameU
row_value = Application.ActiveWindow.Shape.CellsSRC(visSectionUser, i, visUserValue).FormulaU
row_prompt = Application.ActiveWindow.Shape.CellsSRC(visSectionUser, i, visUserPrompt).FormulaU
Debug.Print Mid(row_value, 2, 6), Left(row_value, 6)
bl = InStr(row_value, Trim("Pages["))
If bl = True Then '
n = n + 1
If n = 1 Then new_prompt = "setf(getref(user." & row_name & "), " & row_value & ")"
If n > 1 Then new_prompt = new_prompt & "+setf(getref(user." & row_name & "), " & row_value & ")"
ActiveDocument.DocumentSheet.AddNamedRow visSectionUser, "Err318fix", visTagDefault
ActiveDocument.DocumentSheet.Cells("User.Err318fix.prompt").FormulaU = new_prompt
Application.ActiveWindow.Shape.DeleteRow visSectionUser, ActiveWindow.Shape.RowCount(242) - 1