Referencing LayerManager Actions in Code

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

Referencing LayerManager Actions in Code

LayerManager includes the following useful actions that can be called by your own code, such as VBA macros or C#.

 

Parameter

Description

ApplyShapeLayerSet.<layer set name>

Applies the named layer set to the page, if the named Layer Set Button exists on the active page

ApplyShapeLayerSetToDocument.<layer set name>

Applies the named layer set to all the pages, if the named Layer Set Button exists on the active page

SwapEnds

Reverses the direction of all selected 1D shapes

MatchHeights

Makes all secondary selected 2D shapes to be the same height as the primary selected 2D shape

MatchWidths

Makes all secondary selected 2D shapes to be the same width as the primary selected 2D shape

MatchWidthsAndHeights

Makes all secondary selected 2D shapes to be the same wideth and height as the primary selected 2D shape

 

They simply need to be called with the Visio Application.QueueMarkerEvent(contextString), where the contextString is "bvLayerManager.<parameter>"

 

VBA example to apply the "Space Usage" layer set to the active page:

 

Application.QueueMarkerEvent "bVLayerManager.ApplyShapeLayerSet.Space Usage"