次の方法で共有


SetRasterExportResolution Method

Specifies the raster export resolution settings.

Version Information

Version Added: Visio 2010

Syntax

expression .SetRasterExportResolution(resolution, [Width], [Height], [resolutionUnits])

expression An expression that returns an ApplicationSettings object.

Parameters

Name

Required/Optional

Data Type

Description

resolution

Required

VisRasterExportResolution

The raster export resolution. See Remarks for possible values.

Width

Optional

Double

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

Height

Optional

Double

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

resolutionUnits

Optional

VisRasterExportResolutionUnits

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

Return Value

Nothing

Remarks

The resolution parameter must be one of the following VisRasterExportResolution constants.

Constant

Value

Description

visRasterUseScreenResolution

0

Use screen resolution.

visRasterUsePrinterResolution

1

Use printer resolution.

visRasterUseSourceResolution

2

Use source resolution.

visRasterUseCustomResolution

3

Use custom resolution.

If resolution is a constant other than visRasterUseCustomResolution, SetRasterExportResolution ignores all other parameters.

If resolution is visRasterUseCustomResolution, SetRasterExportResolution accepts values for all parameters, if they meet the noted constraints. If they do not meet these constraints, SetRasterExportResolution returns an Invalid Parameter error.

The resolutionUnits parameter must be one of the following VisRasterExportResolutionUnits constants.

Constant

Value

Description

visRasterPixelsPerInch

0

Pixels per inch.

visRasterPixelsPerCm

1

Pixels per centimeter.

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