Share via


Shape Element [Visio 2003 SDK Documentation]

Contains elements that define a shape in a Master, Page, or group shape element.

Syntax

<Shape
    ID
    [Del]
    [MasterShape]
    [UniqueID]
    [Name]
    [NameU]
    [Master]
    [Type]
    [LineStyle]
    [FillStyle]
    [TextStyle]>
</Shape>

Attributes

ID

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

Shape elements in Master elements may not use the ID 0, 1, 2, or 3 (these ID numbers are reserved for internal use). Any ID greater than or equal to 4 is valid if the Shape element is in a Master element.

Del

Optional boolean. A flag indicating whether the element is deleted locally. A value of 1 indicates that the element is deleted locally.

This attribute is only meaningful in shapes that are instances of masters.

MasterShape

Optional int. This attribute may only be present in shapes that are members of a group shape, and the group is an instance of a master. The attribute contains an ID that references the corresponding sub-shape in the master.

The MasterShape and Master attributes may not co-exist. If both are present, Microsoft Office Visio regards the Master attribute and ignores the MasterShape attribute.

UniqueID

Optional string. A GUID (globally unique identifier) assigned to the shape.

Name

Optional string. The name of the element.

NameU

Optional string. The universal name of the element.

Master

Optional int. The ID of the Master element from which the shape inherits its data.

The MasterShape and Master attributes may not co-exist. If both are present, Visio regards the Master attribute and ignores the MasterShape attribute.

Type

Optional enumeration. The type of a shape. It may be one of the following values: Group, Shape, Guide, or Foreign.

LineStyle

Optional int. The ID of the StyleSheet from which this shape inherits line formatting.

If the shape is an instance of a Master, omit the LineStyle, FillStyle, or TextStyle for the shape to inherit those attributes from its Master.

FillStyle

Optional int. The ID of the StyleSheet from which this shape inherits fill formatting.

If the shape is an instance of a Master, omit the LineStyle, FillStyle, or TextStyle for the shape to inherit those attributes from its Master.

TextStyle

Optional int. The ID of the StyleSheet from which this shape inherits text formatting.

If the shape is an instance of a Master, omit the LineStyle, FillStyle, or TextStyle for the shape to inherit those attributes from its Master.

Element properties

Property Value
Name Shape
Minimum Occurrences 0
Maximum Occurrences Unbounded

Element information

Parent elements

Shapes

Child elements

Shapes

Text

XForm

Line

Fill

XForm1D

Event

LayerMem

StyleProp

Foreign

PageProps

TextBlock

TextXForm

Align

Protection

Help

Misc

RulerGrid

DocProps

Image

Group

Layout

PageLayout

PrintProps

Char

Para

Tabs

Scratch

Connection

ConnectionABCD

Field

Control

Geom

Act

Layer

User

Prop

Hyperlink

Reviewer

Annotation

SmartTagDef

Data1

Data2

Data3

ForeignData

See also

Shape object