Vault Events
The vault events occur when actions affect the entire vault. These events do not occur in the PowerWeb.
Vault Event Sequences
The events that occur for the vault commands are shown in the following lists in the sequence that they occur.
Change scope event sequence
- VaultEvent_ChangeScope
Change view event sequence
- VaultEvent_ChangeView
Close event sequence
- VaultEvent_Close
- VaultEvent_ChangeView
Open event sequence
- VaultEvent_Open
VaultEvent_ChangeScope Event
This event can be invoked by script to present the user with a list of scopes from which to choose. The scopes can be existing ones defined in the vault configuration or this procedure can define a temporary virtual scope based upon an existing one like a template.
Syntax
VaultEvent_ChangeView(ScopeName, Scope)
Remarks
This procedure is intended to be used in vaults that contain many projects and by users who should be limited by scopes to only work on those projects to which they are assigned. Scopes defined in Meridian Configurator cannot be modified by this procedure. The virtual scopes defined by this procedure exist only within the current vault transaction. This procedure is not supported in PowerUser.
The DynamicScopes property used in this procedure is a one dimension array of the internal names of scopes to present to the user for selection. The names must not contain any leading numbers or non-English characters. The names should not contain any spaces until after the scope has been defined, then its DisplayName property can be set and include spaces. The array replaces the normal list of scopes defined in the vault configuration. All scope names in this array must be handled by this procedure. If the user selects an unhandled virtual scope, no scope will be applied and errors can occur. No automatic security validation is performed, it is the responsibility of the procedure to do so, if required.
Example
Sub VaultEvent_ChangeScope(ScopeName,Scope) ' Set scope based on user name If (User.Name = "Benjamin") Then ' Create a scope based on an existing scope named Manager Set Scope = Vault.Scope("Manager") ' Give it the project name Scope.DisplayName = ScopeName ' Set its root folder based on the project name If (ScopeName = "Project123") Then Scope.RootFolder = "\West\Metropolis\123" ElseIf (ScopeName = "Project234") Then Scope.RootFolder = "\West\Metropolis\234" ElseIf (ScopeName = "Project345") Then Scope.RootFolder = "\West\Metropolis\345" Else ' Other projects use a default scope Set Scope = Vault.Scope(ScopeName) End If ' Show available scopes for Benjamin Scope.DynamicScopes = Array ("Project 123", "Project 234", "Project 345") Else ' Other users get the default scope Set Scope = Vault.Scope(ScopeName) End If End Sub
VaultEvent_ChangeView Event
Occurs when a user selects a different navigation view of the vault.
Syntax
VaultEvent_ChangeView(View)
Name | Description |
---|---|
View |
A string that contains the name of the view selected by the user. |
Remarks
Not available in PowerWeb.
VaultEvent_Close Event
Occurs when a user closes a vault.
Syntax
VaultEvent_Close()
Parameters
This event receives no parameters.
Remarks
Not available in PowerWeb.
VaultEvent_NewProfile Event
Occurs after a new profile file is created for a user and they open a vault for the first time in PowerWeb.
Syntax
VaultEvent_Open()
Parameters
This event receives no parameters.
VaultEvent_Open Event
Occurs when a user opens a vault.
Syntax
VaultEvent_Open()
Parameters
This event receives no parameters.
Remarks
Not available in PowerWeb. This event is not invoked by the Document Import tool. Consider using the Option property of the Vault object with values stored on the Settings page in the Vault Settings group in the Environment branch in Meridian Enterprise Configurator instead.