Master Element [Visio 2003 SDK Documentation]
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.
Syntax
<Master
ID
[BaseID]
[UniqueID]
[MatchByName]
[Name]
[NameU]
[IconSize]
[PatternFlags]
[Prompt]
[Hidden]
[IconUpdate]
[AlignName]>
</Master>
Attributes
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 Office 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:
|
1 |
Enable MatchByName. If enabled, then dragging the original master from the stand-alone stencil into the drawing:
|
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:
In addition, 40 (scale) can optionally be included. |
2 |
Line end pattern. If selected, the pattern mode should be one of the following values:
In addition, 400 (scale) can optionally be included. |
4 |
Fill pattern. If selected, the pattern mode should be one of the following values:
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. |
Element properties
Property | Value |
---|---|
Name | Master |
Minimum Occurrences | 0 |
Maximum Occurrences | Unbounded |
Element information
Parent elements
Child elements
See also
Master object