SetRasterExportSize Method

Sets the raster export size.

Version Information

Version Added: Visio 2010

Syntax

expression .SetRasterExportSize(size, [Width], [Height], [sizeUnits])

expression An expression that returns an ApplicationSettings object.

Parameters

Name

Required/Optional

Data Type

Description

size

Required

VisRasterExportSize

The raster export size. See Remarks for possible values.

Width

Optional

Double

The raster export size width. Must be greater than or equal to 1.

Height

Optional

Double

The raster export size height. Must be greater than or equal to 1.

sizeUnits

Optional

VisRasterExportSizeUnits

The units used to specify size. See Remarks for possible values.

Return Value

Nothing

Remarks

The size parameter must be one of the following VisRasterExportSize constants.

Constant

Value

Description

visRasterFitToScreenSize

0

Use screen size.

visRasterFitToPrinterSize

1

Use printer size.

visRasterFitToSourceSize

2

Use source size.

visRasterFitToCustomSize

3

Use custom size.

If size is anything other than visRasterFitToCustomSize, SetRasterExportSize ignores all other parameters.

If size is visRasterFitToCustomSize, SetRasterExportSize accepts values for all parameters, if they meet the noted constraints. If they do not meet these constraints, SetRasterExportSize returns an Invalid Parameter error.

The sizeUnits parameter must be one of the following VisRasterExportSizeUnits constants.

Constant

Value

Description

visRasterPixel

0

Pixels

visRasterCm

1

Centimeters

visRasterInch

2

Inches

When the SetRasterExportSize method runs successfully, the resulting settings will remain in effect until you either run the method again or change the settings in ther user interface.