Microsoft KB Archive/254744

From BetaArchive Wiki
< Microsoft KB Archive
Revision as of 12:53, 21 July 2020 by X010 (talk | contribs) (Text replacement - """ to """)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Knowledge Base

Visio5: "Could Not Run Visio" Error After Starting the Visio Enterprise Test Drive from the Visual Studio Toolbar

Article ID: 254744

Article Last Modified on 8/16/2006


  • Visio 5.0 Enterprise, when used with:
    • Microsoft Windows NT 4.0

This article was previously published under Q254744


When you customize Microsoft Visual C++ or Microsoft Visual Basic by using the Visio Enterprise add-ins, Visio Enterprise creates a three-button toolbar in the Visual Studio development environment. You can use these toolbar buttons to open Visio Enterprise, to create a new Visio UML document, or to reverse engineer your source code to create a UML model.

With the Visio Enterprise Test Drive running on Windows NT, when you click one of the Visio toolbar buttons in Visual C++ or Visual Basic, Visio Enterprise starts, but with an empty window. In addition, when you move the Visio application window, you receive the following error message:

Could not run Visio.


You can work around the problem by clicking OK in the error message window, and then following the procedure that applies to your situation.

To create a new diagram or UML model:

  1. On the File menu, click New.
  2. Select the template that you want to base the diagram on, and then click OK.

For help creating your diagram, click Template Help on the Help menu, double-click Visio Templates, and then select the type and name of the template that you want.

To complete the reverse engineering of your source code:

  1. In Windows Explorer, browse to the Temp folder (usually C:\Temp).
  2. Find the file named Umlxxxx.tmp, where xxxx is a 3- or 4-digit number, and write down the name. If you see multiple file names that start with "Uml," pick the one with the most recent date and time stamp.
  3. In the Visio Enterprise window, point to New on the File menu, point to UML, and then click UML Model Diagram.
  4. When the new drawing opens, point to Macro on the Tools menu, and then click Visual Basic Editor.
  5. In the Visual Basic Editor, click Immediate Window on the View menu.
  6. In the Immediate window, type the following code, where Umlxxxx.tmp is the file name that you wrote down in step 2:

    visio.Addons("UML Background Add-on").Run("/doc=1 /CMD=301 /file=c:\temp\umlxxxx.tmp /types=CPP /nodelete")

  7. Press ENTER to run the command.

    You can now use the UML Navigator to view your reverse-engineered UML elements.

NOTE: You can create a Visio Enterprise drawing by dragging elements from the UML Navigator to the drawing page.

TIP: If you want to reverse engineer multiple projects with the Visio Enterprise Test Drive, you can create a Visual Basic for Applications macro that contains the code in step 6.


For more information about reverse engineering your source code with Visio Enterprise, search for "UML" in the Visio Enterprise Test Drive Help.

Keywords: kberrmsg kburl KB254744