LayerColorOverride Property

Gets or sets a value that indicates whether the color of the specified layer is reset to the default color in the current drawing in Microsoft Visio Viewer. Read/write.

Syntax

expression .LayerColorOverride(LayerIndex)

expression An expression that returns a Viewer object.

Parameters

Name

Required/Optional

Data Type

Description

LayerIndex

Required

Long

The index of the layer in the collection of layers in the drawing open in Visio Viewer.

Return Value

Boolean

Remarks

The collection of layers is one-based, so the index of the first layer in the collection is 1. If there are no layers in the drawing, or if you pass the index of a nonexistent layer, the LayerColorOverride property returns False. The default value is True.

Example

The following code shows how to override the color of the layer at index position 1.

vsoViewer.LayerColorOverride(1) = False