CurrentScope property

Microsoft Visio Developer Reference

CurrentScope property

       

Determines the ID of the scope that causes an event to fire.

Version added

2000

Syntax

longRet = object.CurrentScope

longRet

Long. The scope ID of the most recently fired EnterScope event; visScopeIDInvalid (-1) if a scope isn't open.

object

Required. An expression that returns an Application object.

Remarks

The scope ID could be an internal Visio scope ID that corresponds to a Visio command or an external scope ID passed to an Automation client through the BeginUndoScope method.

The recipients of an event consider a scope open if the EnterScope event has fired, but the ExitScope event has not fired.

To determine if the event queue firing is related to a particular scope internal to the application or one opened and closed by an Automation client, use the IsInScope property.