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.
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 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
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).
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 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