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

Chapter 13. Generating Visio Drawings wi... > Getting a Reference to a Master on a...

Getting a Reference to a Master on a Stencil

After you have the reference to the Stencil object, you will need to obtain a reference to the Masters collection of that Stencil. To do this, you use the Masters property of the Stencil Document object. You must do this step before you can reference any individual Master SmartShape symbol on the Stencil. Study the code framework in Listing 13.1.

Listing 13.1. Finding a Master on a Stencil

Public Sub ReferenceFlowchartMaster()
    Dim docsObj As Visio.Documents
    Dim docObj As Visio.Document
    Dim stnObj As Visio.Document
    Dim mastsObj As Visio.Masters
    Dim mastObj As Visio.Master
    Set docsObj = Visio.Documents
    Set docObj = docsObj.Add("Basic Flowchart.VST")
    Set stnObj = docsObj.Item("Basic Flowchart Shapes.vss")
    Set mastsObj = stnObj.Masters
    Set mastObj = mastsObj.Item("Process")
    MsgBox mastObj.Name
End Sub


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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