ForeignData Element

Visio XML Reference

Contains a MIME (Multipurpose Internet Mail Extensions) encoded BLOB of picture data, such as Windows metafile, bitmap, or OLE data.

Syntax

  <ForeignData
    ForeignType
    [ObjectType]
    [ShowAsIcon]
    [ObjectWidth]
    [ObjectHeight]
    [MappingMode]
    [ExtentX]
    [ExtentY]
    [CompressionType]
    [CompressionLevel]>
</ForeignData>

Attributes

ForeignType

Required enumeration.

Value Description

4

Object

16

Metafile

32

Bitmap

ObjectType

Optional int. If the ForeignType attribute is "Object", the ForeignData element must also have an ObjectType attribute. The ObjectType attribute is an integer value that may be a sum of the following values.

Value Description

256

Linked object

512

Embedded object

1024

Control

16384

OLE2 Named

32768

OLE2 object

ShowAsIcon

Optional Boolean. This attribute is only meaningful if the foreign data is an OLE2 embedded object.

Value Description

0

Do not show embedded data as an icon.

1

Show embedded data as an icon.

ObjectWidth

Optional float. This attribute is only meaningful if the foreign data is an OLE2 embedded object. The value expresses the width of the object in page units.

ObjectHeight

Optional float. This attribute is only meaningful if the foreign data is an OLE2 embedded object. The value expresses the height of the object in page units.

MappingMode

Optional int. This attribute is only meaningful if the foreign data is a metafile. The value indicates the metafile mapping mode.

ExtentX

Optional float. This attribute is only meaningful if the foreign data is a metafile. The value indicates the horizontal extent of the metafile.

ExtentY

Optional float. This attribute is only meaningful if the foreign data is a metafile. The value indicates the vertical extent of the metafile.

CompressionType

Optional string. This attribute is only meaningful if the foreign data is a raster-based foreign object, such as a DIB, JPG, PNG, TIFF, or GIF file. The value indicates the type of compression applied to the file.

Value Description

0

No compression (the default)

1

JPEG compression

2

GIF compression

3

TIFF compression

4

PNG compression

CompressionLevel

Optional float. This attribute is only meaningful if the foreign data is a raster-based foreign object, such as a DIB, JPG, PNG, TIFF, or GIF file. The value indicates the level of compression applied to the file. Compression level is measured in hundreths of a percent.

Element properties

Property Value
Name ForeignData 
Minimum Occurrences
Maximum Occurrences

Element information

Parent elements

PageSheet

Shape

StyleSheet

DocumentSheet

Child elements

None

See also

ForeignData property

ForeignType property