• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 12. Visio VBA Automation Basics > VB-Specific Files in Visio

VB-Specific Files in Visio

If you are building your solution based upon an external Automation controller, such as Visual Basic, rather then Visio's internal VBA, you need to know about of two files designed to assist you. These files are VISCONST.BAS and VISREG.BAS.

VISCONST.BAS is a Visual Basic file that contains the Visio constant values for each of the returns from functions as well as arguments to functions. Many, if not most, of the arguments to Visio properties and methods seem, to the programmer, to be rather arbitrary numeric values. As an example, the Type property of a Window object returns the integer 1, 2, 3, or 4 to indicate the window type. VISCONST.BAS contains defined constants for these values: visDrawing, visStencil, visSheet, and visIcon. Using these constants will make your code easier to read and maintain. Listing 12.3 is an example of using these constants in code:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint