This documentation is archived and is not being maintained.

Master Element

Office 2010


Contains elements that define a master for the document.

A master is a shape on a stencil that you use repeatedly to create drawings. When you drag a shape from a stencil onto the drawing page, the shape becomes an instance of that master, and a local copy of the master is included in the document.

<Master
    ID
    [BaseID]
    [UniqueID]
    [MatchByName]
    [Name]
    [NameU]
    [IconSize]
    [PatternFlags]
    [Prompt]
    [Hidden]
    [IconUpdate]
    [AlignName]>
</Master>

ID

Required int. The unique ID of the element within its parent element.

BaseID

Optional String. A GUID (globally unique identifier) that identifies the master across documents.

UniqueID

Optional String. A GUID that identifies the master within the document.

MatchByName

Optional Boolean. The MatchByName attribute determines how Microsoft Visio decides if a document master is already present when an instance of a master is dropped on the drawing page. It allows changes made to a document master to apply to new instances of the master, even if the instances are dragged from a stand-alone stencil file.

Value

Description

0

Disable MatchByName. If disabled, then dragging the original master from the stand-alone stencil into the drawing:

  • Creates an instance with the original master's attributes.

  • Produces a second document master.

1

Enable MatchByName. If enabled, then dragging the original master from the stand-alone stencil into the drawing:

  • Creates an instance with the document master's attributes.

  • Does not produce a second document master.

For example, suppose you create an instance of a master from a stencil in a document. This results in a local copy of the master being included in that document. Then you make modifications to the document master (such as changing its fill color).

Name

Optional String. The name of the element.

NameU

Optional String. The universal name of the element.

IconSize

Optional int. The size of the element's icon.

Value

Description

1

Normal

2

Tall

3

Wide

4

Double

PatternFlags

Optional int. The PatternFlags attribute determines whether a master behaves as a custom pattern.

Value

Description

0

The master does not behave as a custom pattern.

Non-zero

The master behaves as a custom pattern.

If the master behaves as a pattern, the PatternFlags attribute can include a combination of the following hexadecimal values to determine the pattern to apply:

Value

Description

1

Line pattern. If selected, the pattern mode should be one of the following values:

  • 0 (tile deform)

  • 10 (tile)

  • 20 (stretch)

  • 30 (annotate)

In addition, 40 (scale) can optionally be included.

2

Line end pattern. If selected, the pattern mode should be one of the following values:

  • 0 (default)

  • 100 (upright)

In addition, 400 (scale) can optionally be included.

4

Fill pattern. If selected, the pattern mode should be one of the following values:

  • 0 (tile)

  • 1000 (center)

  • 2000 (stretch)

In addition, Scale (4000) can optionally be included.

Prompt

Optional String. The status bar and tool tip prompt for the element.

Hidden

Optional Boolean. Specifies whether the master is hidden in the user interface.

Value

Description

0

The master is not hidden.

1

The master is hidden.

IconUpdate

Optional Boolean. Specifies whether the icon is automatically generated from the master itself.

Value

Description

0

The icon is not automatically generated.

1

The icon is automatically generated.

AlignName

Optional int. Specifies whether the master's text in the stencil window is aligned left, right, or center.

Value

Description

1

Align text left.

2

Align text center.

3

Align text right.

Property

Value

Name

Master

Minimum Occurrences

0

Maximum Occurrences

Unbounded

Show: