Installing a Visio Solution

3 4

If you're providing your solution as a Microsoft Visual Basic for Applications (VBA) program, a Component Object Model (COM) add-in, or single executable (EXE ) file, you might not need to create a Setup program to install it. However, if your solution includes one or more EXE files or DLLs, stencils, templates, or a Help file, a Setup program can assist the user to install your solution easily and accurately.

This section describes where to install your solution's files. For details about creating a Setup program, see the documentation for your development environment.

Specifying Visio File Paths and Folders

When installing your solution, install your program and Microsoft Visio files in folders in the appropriate path as specified on the File Paths tab (on the Tools menu, click Options).

Figure 26-1.  <b>File Paths</b> tab.

Figure 26-1 File Paths tab.

By default, the path containing the Solutions folder and its subfolders under the correct language folder for Visio is the specified path for templates, stencils, and add-ons. The path containing the Help folder under the correct language folder for Visio is the specified path for Help files. For example, to install templates that contain VBA macros, place them in the Solutions folder or any of its subfolders.

You might choose to install COM add-ins in the Solutions folder as well; however, the path in which you install COM add-ins is less important because Visio will look for COM add-ins based on where they are registered.

You can also change and add folders to the file paths to include custom folders you create. To indicate more than one folder in a path, separate individual items in the path string with semicolons. In the preceding figure, the add-ons path has been changed to "1033\Solutions ; 1033\ DVS ".

Note


If a path is not fully qualified, Visio looks for that folder in the folder that contains the Visio application files. For example, if the Visio executable file is installed in c:\Visio and the add-ons path is "Add-ons;d:\Add-ons", Visio would look for add-ons in both c:\Visio\Add-ons and d:\Add-ons and their corresponding subfolders.

Installation paths for your program's files

Install this file

In this Visio path

Program (EXE)

Add-ons

Visio library (VSL)

Add-ons

COM add-in (DLL)

Any path is allowed; the path information is determined by the registry settings.

Help (HLP or CHM) for programs or shapes

Help

Stencil (VSS or VSX)

Stencil

Template (VST or VTX)

Template

You can also find out what paths are in effect on the user's system by checking the following properties of an Application object: AddonPaths, StartupPaths, DrawingPaths, StencilPaths, FilterPaths, TemplatePaths, and HelpPaths.

Application object properties that correspond to File Paths tab settings

File Path field Property

Drawings

DrawingPaths

Templates

TemplatePaths

Stencils

StencilPaths

Help

HelpPaths

Add-ons

AddonPaths

Start-up

StartupPaths

Filters

FilterPaths

For example, to get the AddonPaths property:

 strPath = Visio.Application.AddonPaths  

For more information about the Application object and its properties, see the Microsoft Visio Developer Reference (on the Help menu, click Developer Reference).

How Visio Searches File Paths

Files placed in the folders in a specified Visio path appear on selected menus and in dialog boxes in the user interface. By installing your solution files in folders in the appropriate Visio paths, you can take advantage of this behavior. When you use these paths, your solution files become available in the following ways:

  • When Visio isn't running in developer mode, add-ons in folders in the Visio Add-ons path specified on the File Paths tab appear in the Macros dialog box and on the Macros submenu, along with VBA macros for the document that is open.
  • When Visio is running in developer mode, add-ons in folders in the Visio Add-ons path specified on the File Paths tab appear in the Run Add-on dialog box (on the Tools menu, point to Add-ons, and then click Run Add-on) and on the Add-ons submenu.

    Note


    To run Visio in developer mode, click Options on the Tools menu, click the Advanced tab, select the Run in developer mode check box, and then click OK.

  • Template files in folders in the Visio templates path appear in the Choose Drawing Type and Open dialog boxes, and on the New submenu on the File menu.
  • Stencils in folders in the Visio stencils path are listed on the Stencils submenu on the File menu and in the Open Stencil dialog box.


Developing Microsoft Visio Solutions 2001
Developing Microsoft Visio Solutions (Pro-Documentation)
ISBN: 0735613532
EAN: 2147483647
Year: 2004
Pages: 180

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net