0% found this document useful (0 votes)
231 views422 pages

Meridian2021 R2 VR LTR

Uploaded by

Eduardo Ruiz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
231 views422 pages

Meridian2021 R2 VR LTR

Uploaded by

Eduardo Ruiz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 422

ENTERPRISE VBSCRIPT API REFERENCE

2021 R2

Accruent, LLC 11500 Alterra Parkway, Suite 110, Austin, TX 78758                                      www.accruent.com


Accruent Confidential and Proprietary, copyright 2021. All rights reserved.
This material contains confidential information that is proprietary to, and the property of, Accruent, LLC. Any
unauthorized use, duplication, or disclosure of this material, in whole or in part, is prohibited.
No part of this publication may be reproduced, recorded, or stored in a retrieval system or transmitted in any
form or by any means—whether electronic, mechanical, photographic, or otherwise—without the written
permission of Accruent, LLC.
The information contained in this document is subject to change without notice. Accruent makes no warranty of
any kind with regard to this material, including, but not limited to, the implied warranties of merchantability and
fitness for a particular purpose. Accruent, or any of its subsidiaries, shall not be liable for errors contained herein
or for incidental or consequential damages in connection with the furnishing, performance, or use of this
material.

Confidential and Proprietary © 2021 i                                                           www.accruent.com


Contents
Introducing Accruent Meridian Enterprise 1
Meridian Enterprise Script Editor 6
Effects Of Custom Scripting 9
Debugging VBScript 10
Microsoft Script Debugger 14
Configuration Expressions 15
Meridian Object Model 16
Attachment Object 17
Attachments Object 18
Batch Object 20
BCPropStorage Object 32
Briefcase Object 35
Client Object 38
Document Object 45
Document Object Properties 46
Document Object Methods 58
DocumentType Object 86
ExportPackage Object 88
ExportPackages Object 96
Folder Object 98
Folder Object Properties 99
Folder Object Methods 105
ImportPackage Object 114
ImportProfile Object 116
MailMessage Object 118
MailRecipient Object 120
MailRecipients Object 122
MasterDocument Object 125
MeridianQueue Object 126
MeridianTask Object 131
NewMailMessage Object 134
ProjectCopy Object 136
Query Object 138
References Object 140
Report Object 143
Roles Object 145
Scope Object 148

Confidential and Proprietary © 2021 ii                                                           www.accruent.com


Sequence Object 150
Table Object 152
Task Object 161
User object 163
Vault Object 167
Viewer Object 184
WaitingList Object 185
Workflow Object 187
WorkflowState Object 189
WorkflowTransition Object 191
Meridian Functions 193
AIMS_Commands Function 194
AIMS_Properties Function 195
AIMS_UpdateChangeManagement Function 196
AMCreateObject Function 197
AMMGetCustomColumnHeaders Function 198
AMMGetCustomColumnValues Function 199
AMMGetReportCustomHeaderValues Function 202
AMMGetReportTableRowValues Function 203
AMMMainTagDocumentId Function 206
AMMPropertiesToBeRequested Function 207
AMMTags4TagPageIsVisible Function 208
AMMTagsManageLinksIsAllowed Function 209
AMMTagsPageIsVisible Function 210
AMMUseMainTag Function 211
AMMWhereUsedManageLinksIsAllowed Function 212
AMMWhereUsedPageIsVisible Function 213
DebugAssert Function 214
FileExtension Function 215
FileRoot Function 216
FormatSequenceAlfa Function 217
FormatSequenceAlfaNum Function 218
FormatSequenceNum Function 219
GMTTime2Local Function 220
ListFromColumn Function 221
LocalTime2GMT Function 222
PnIDLink_GetAssetCoordinates Function 223
PnIDLink_GetSheetSize Function 224

Confidential and Proprietary © 2021 iii                                                           www.accruent.com


PnIDLink_IsMainDrawing Function 225
Quote Function 226
ValidateFolderName Function 227
WinInputBox Function 228
WinMsgBox Function 229
Creating Custom Functions 230
Meridian Event Procedures 231
Names Of Events 232
Batch Events 233
Order Of Events 234
Create and Edit Event Procedures 236
Limiting Events Generated By VBScript 237
Asset Management Events 238
Briefcase Events 248
CAD Link Events 260
Custom Command Events 266
Document Copy/Move Events 271
Document Generic Events 278
Document Hybrid Events 295
Document Project Copy Events 298
Document Type Workflow Events 310
Document Working Copy Events 314
Folder Generic Events 316
Package Events 319
Project Workflow Events 322
Property Page Events 330
Publishing Events 333
Vault Events 338
Workflow Definition Events 342
Meridian API Constants 346
VBScript Examples 349
Automation Objects 352
Object Arguments 354
VBScript and PowerWeb 355
Formatting Text With RTF Codes 357
Meridian Enterprise Command Identifiers 360
TagExtractor Component 362
TagExtractor Object 363

Confidential and Proprietary © 2021 iv                                                           www.accruent.com


TagCollection Object 369
Tag Object 370
TagIterator Object 372
TagExtractor Result Codes 376
Publishing And Rendering Options 377
Glossary 383

Confidential and Proprietary © 2021 v                                                           www.accruent.com


Introducing Accruent Meridian Enterprise
Accruent Meridian Enterprise is a departmental to enterprise-wide engineering information management
(EIM) and asset lifecycle information management system (ALIM). It can be installed with the following
database engines: BlueCielo Hypertrieve, Microsoft® SQL Server®, or Oracle®. The number of vaults,
documents, and concurrent users is limited only by available hardware resources on the host server
computer. For the supported versions, see the Supported Software document for this release of Meridian
available from your Accruent Partner or the Meridian Technical Library.

What's In This Guide


The primary method for customizing Meridian to meet your requirements, besides vault configuration
described in the AccruentMeridian Enterprise Configuration Guide, is to use Visual Basic Scripting Edition
(VBScript). VBScript is a subset of the Visual Basic programming language that is built into Meridian and
many other applications. VBScript provides programmatic access to many Meridian event procedures,
functions, and objects such as vaults, folders, documents, properties, and so on, so that you can automate
simple tasks. The Meridian objects that are accessible by VBScript are described in Meridian Object Model.
VBScript is used by Meridian in two ways:
l Configuration expressions as described in Configuration Expressions
l Meridian event handling procedures as described in Understanding Meridian event procedures
This reference describes how to use VBScript with Meridian. For general information about the VBScript
language, see the VBScript Language Reference web site.
Note:
l VBScript is not as complete a programming language as Visual Basic for Applications, which is built
into Microsoft Office and other applications such as AutoCAD.
l The examples shown in this document are for educational purposes only, may not represent a
complete solution, and are not intended for use in a production environment.

Who Should Read This Guide


This guide is intended for advanced Meridian users who are responsible for vault configuration and
security. You should be familiar with:
l The Windows® operating system, including its use in a network environment
l All aspects of using Meridian from an end user's perspective
l How your organization uses and manages documents as it conducts business
l The practices and requirements of user groups who will use the system
l Basic document control methodologies such as revision control
l Programming with VBScript

Confidential and Proprietary © 2021 1                                                           www.accruent.com


Typographic Conventions
The table below describes the typographic conventions used throughout this manual.

Typographic conventions

Convention Example Descriptio


n
bold Edit Named user
interface
elements:
menu items,
button
names, dialog
box titles,
dialog box
options,
icons, and so
on. 
italic AccruentMeridian Enterprise Names of
Administrator's Guide other
documents.
monospace Document.DisplayName Programming
code,
configuration
file settings,
and file
system paths
and folder
names. Also
user-defined
code
elements
appearing in
the narrative
text.

Confidential and Proprietary © 2021 2                                                           www.accruent.com


Convention Example Descriptio
n
Call WinMsgBox(“Hello, Programming
light gray world!”) examples that
background include
sample data
and are not
intended to
be used
without
modification.
bold Document.Log(Line) Named code
elements: eve
nts,
procedures,
functions,
objects,
classes,
methods,
object
properties,
constants,
and so on
appearing in
the narrative
text except
user-defined
code
elements.
Variables and
parameters
appear in
italic type.
italic local workspace Introduction
of a new term
and its
definition.
Many terms
can also be
found in the
Glossary if
one is
included in
the guide.

Confidential and Proprietary © 2021 3                                                           www.accruent.com


Convention Example Descriptio
n
bold monospace regsvr32 /u Command-
line
commands
and
parameters.
default font F5, Ctrl+O Key names,
combination
s, and
sequences.
italic <DocumentName> Placeholders
icons Note: Related
Supplemental info information
that is not
Important! directly
Critical info applicable to
the adjacent
text or might
be useful
under
uncommon
circumstance
s;
supplementa
l, an aside.

Information
that, if not
heeded, could
result in lost
data or
accidents.

bold DisplayName Meridian


Enterprise
property
names

Confidential and Proprietary © 2021 4                                                           www.accruent.com


Technical Support
Technical support for Accruent products is available from a variety of sources if you have an active support
contract. Your first source of support is the authorized contacts designated by your company to participate
in the support contract. They are the persons that are responsible for resolving problems with Accruent
software before contacting outside sources of support. If your company works with a Accruent Partner,
that partner is your second source of support. Accruent Partners are responsible for providing technical
support to their customers in order to maintain their status as Accruent Partners. Accruent will assist the
partner company, if necessary, to help resolve your problem. If your company is a direct Accruent
customer, your authorized contacts may communicate directly with Accruent to resolve your problem.
Accruent Partners and direct customers have access to all of these Accruent technical support resources:
l Support Cases — Around the clock support issue entry, update, and status.
l Meridian knowledge base — Continuously updated problem solutions, minor releases, updates, and
how-to articles about advanced techniques.
l Email notifications — Immediate alerts to support issue status changes.
l Telephone support — Direct access to highly qualified software support engineers with extensive
experience in Accruent products.
The available support contract options, terms, and other details are described in documents that are
available from your Accruent Partner.

Confidential and Proprietary © 2021 5                                                           www.accruent.com


Meridian Enterprise Script Editor
The Meridian Enterprise Script Editor is a simple text editor for entering VBScript code, as shown in the
following figure. This code is saved in the Meridian vault configuration. The code for each configuration
expression is saved as a separate code block and all of the Meridian event procedures code is saved as one
code block. To edit a code block, open the Meridian Enterprise Script Editor from the place in Configurator
where the code block is applied.

Confidential and Proprietary © 2021 6                                                           www.accruent.com


The Meridian Enterprise Script Editor is composed of several elements described in the following table.

Features of the VBScript editor

Number Name Description


1 Toolbar Contains buttons for transferring text with the Clipboard, searching code for
text.

2 Object Displays a tree view of the VBScript built-in functions and constants, and the
Browser Meridian objects, properties, methods, functions, and constants. For
information about the Meridian objects, see Meridian Object Model. For
information about the Meridian functions, see Understanding the Meridian
functions.

3 Code pane The area for entering VBScript code.

4 Events and Displays a tree view of the Meridian events and any custom functions that
Procedures have been defined. For information about the Meridian events, see
Understanding Meridian event procedures. This view is only available when
editing the Meridian events, as described in Create and Edit Event
Procedures.

5 Status bar Displays indicators for the current script's validity (if the Use validation
option is enabled) and the current cursor position. The performance of
loading large scripts can be improved by disabling Use syntax coloring
option.

The commands for each icon on the toolbar are described in the following table.

Toolbar icons

Icon Shortcut Description


Ctrl + O Load a file from disk to completely replace the current code block. Available only
when editing the Meridian events, as described in Create and Edit Event
Procedures.

Ctrl + S Save the current contents of the editor to a file on disk. The default file name that
F12 is calculated includes the current date. Available only when editing the Meridian
events, as described in Create and Edit Event Procedures.

Ctrl + X Cut the selected text to the Clipboard.

Ctrl + C Copy the selected text to the Clipboard.

Ctrl + V Paste text from the Clipboard.

Confidential and Proprietary © 2021 7                                                           www.accruent.com


Icon Shortcut Description
Ctrl + F Find specific text in the current code block. Available only when editing the
Meridian events, as described in Create and Edit Event Procedures.

Ctrl + G Go to a specific line number in the current code block.

The Meridian Enterprise Script Editor can help you to build correct VBScript code by listing all available
objects, functions, and constants for easy selection so that you do not need to remember the names of
every Meridian object and their properties and methods; and every VBScript function and constant. When
you select an object in the Object Browser, the editor enters the object name for you in the code pane
automatically. When you then enter a period, which delineates a subclass of the current object, the
Meridian Enterprise Script Editor displays a popup list of the current object's properties and methods for
selection. Also, when you select a method name from the list and then enter a parenthesis to indicate that
you will specify the parameters of the method, the editor shows a tooltip in the code pane of all required
and optional parameters to assist you.
As you enter VBScript code in the code pane, the Meridian Enterprise Script Editor constantly monitors the
syntax of the code. When the current code is correct, the status bar displays Script is valid. If the syntax of
the current code is incorrect, the status bar displays the error and the location of the error so that you can
easily correct it. If you are entering a configuration expression, when you are finished entering code, you
can test the code by clicking the Evaluate the expression button . The Meridian Enterprise Script Editor
will evaluate the expression and display the result so that you can confirm that the result is what you
expect.

Confidential and Proprietary © 2021 8                                                           www.accruent.com


Effects Of Custom Scripting
Meridian Enterprise client performance can be affected by vault configuration options and custom
scripting. However, the PowerWeb is must less sensitive than the PowerUser client.
Following are some areas in scripting and configuration that can directly affect the user experience.
l Property events
These script events occur when a lookup list is generated or when a value has changed, for example.
Extensive scripting of these events can result in slowness while editing properties. Avoid heavy
actions like table queries on these events.
l Custom command/page/action visibility events
These events calculate whether items should be available in the user interface. They can make
switching documents and showing menus slow.
l Before/After events
These events occur in the same transaction so the client is suspended during the operation. Be
careful how much customization you do in these events because it can make an operation very slow.
l Settings versus scripting versus tables
The Vault.Option property for retrieving custom settings that are stored in the vault configuration is
faster than using a table query for constant values and is more flexible compared to scripting.
l Security validation
Evaluating security privileges in scripting can be very slow. The User.HasPrivilege and User.HasRole
properties can slow down events or operations.
l CAD link property events
These occur for specific events like workflow changes. In most cases, scripting delays during these
events are not critical unless they wait for a result.
l Special cases
Some events, for example, related to creating a project copy or assembly, may not be supported in
PowerWeb. This is because of the performance delays that they may cause because PowerWeb is not
a fully interactive client.
To help with optimizing scripting and configuration, consider using script logging as described in Debugging
VBScript.

Confidential and Proprietary © 2021 9                                                           www.accruent.com


Debugging VBScript
The Visual Studio programmer has the convenience of a debugger built into that development tool but
beyond the script validation feature of the Meridian Enterprise Script Editor, you cannot debug VBScript in
the editor. For real debugging, you need a different tool. The tool to use depends on the client application
where you want to debug the script:
l PowerUser provides a link to the Microsoft Script Debugger as described in Microsoft Script
Debugger. Although the method described below can also be used with PowerUser, installing and
using the Microsoft Script Debugger is just as effective and more convenient.
l To debug VBScript running in a PowerWeb session, the debugging tool must be installed on the
computer running Internet Information Services and you must have administrative rights on the
computer. The Meridian vault configuration is cached by your browser during each PowerWeb
session. You must log off of PowerWeb to close the current session and then log back on again to
load any script changes that you make.
l All other Windows applications where your VBScript code runs can be debugged using Visual Studio
as described below.
The key to debugging VBScript from applications other than PowerUser is the ability of Visual Studio to
attach itself to those applications.
Note:
Visual Studio 2008 or higher must be installed on the computer running the application from which you
want to debug. Other debugging tools can be used as long as they support attaching themselves to a
running process.

Debug in Visual Studio


To debug VBScript in any Windows application with Visual Studio:
1. Start the application that hosts the VBScript that you want to debug.
2. Perform the actions that lead up to the point where your VBScript is about to execute and you want
to start debugging.
3. Start Visual Studio.
The Visual Studio Start Page appears.
4. On the File menu, select New Project.
The New Project dialog appears.
5. In Project Types:
a. Expand Other Project Types.
b. Click Visual Studio Solutions.
c. Select Blank Solution.
d. Click OK.
A new project is created.

Confidential and Proprietary © 2021 10                                                           www.accruent.com


The name of the project is irrelevant because you will not add any code to the project and will
discard it when you are finished using the debugger.
6. On the Tools menu, select Attach to Process.
The Attach to Process dialog appears.
7. Enable Show processes from all sessions.
The Available Processes list refreshes to show additional processes.
8. In Available Processes, select the name of the executable for the host application that you started in
step 1 and click Attach.
For example, to debug a PowerWeb session:
a. Select w3wp.exe.
b. If the Attach Security Warning dialog box appears, click Attach.
The Solution Explorer opens and lists one or more occurrences of AMScriptHost.
9. On the Debug menu, select Break All (or press Ctrl+Alt+Break).
10. Perform the action in the host application that will run the VBScript code that you want to debug.
The Windows focus switches to Visual Studio and a new window opens, either VBScript - script block
[dynamic] if a configuration expression is about to execute or BlueCielo VB Script [dynamic] if a sub-
procedure or function in the event handler code module is about to execute. The next statement that
will execute is highlighted and execution stops to allow you to debug.
When script first executes after the process is attached to Visual Studio, the vault's active VBScript
configuration expressions and the event handler code module are loaded in Visual Studio. You might
have to step over (press F10) some configuration expressions or sub-procedures before the particular
expression, sub-procedure, or function that you want to debug is entered. Whenever the event
handler code module is loaded, you can set breakpoints in the BlueCielo VB Script [dynamic]
window and step through the code similar to debugging in PowerUser as described in Microsoft
Script Debugger.
To open the BlueCielo VB Script [dynamic] window:
a. In the Solution Explorer, expand Script Documents.
b. Expand AMScriptHost.
c. Double-click BlueCielo VB Script.
Just like with using the Microsoft Script Debugger, to make changes to script code, you must edit it in
Meridian Enterprise Configurator, save your changes, reopen the vault in the host application, and
restart this task from step 5.
11. When you are finished debugging, exit Visual Studio without saving the project.

Host Applications You Can Use to Debug


Following is a list of host applications related to Meridian Enterprise that you can attach to debug VBScript
code:
l Explorer.exe to debug the Application Integration
l Acad.exe (or other application) to debug title block links
l ConfiguratorU.exe to debug the Database Import Wizard

Confidential and Proprietary © 2021 11                                                           www.accruent.com


l PowerUserU.exe to debug the Document Import tool
l W3WP.exe to debug PowerWeb on the web server

Enable VBScript Logging and Viewing


To further aid in debugging, you can enable logging of VBScript events, command scripts, evaluated
expressions, and external function calls. You can enable logging only for PowerUser and PowerWeb.
To enable VBScript logging and viewing:
1. If PowerUser is open, close it.
2. In the Windows registry of the client PC, set the following registry values.
These are also described in the Accruent Meridian Enterprise Administrator's Guide:
l EnableScriptLog in HKEY_LOCAL_MACHINE\Software\Cyco\AutoManager

Meridian\CurrentVersion\Client
l File, MaxSize, Format, Filter, and Mode in HKEY_CURRENT_
USER\Software\Cyco\AutoManager
Meridian\CurrentVersion\PowerUser\Settings\Log
The log file is restarted for each client session. The file includes the time, description, and source of the
events.
Note:
l Set the preceding settings in the Wow6432Node branch in the registry for 32-bit clients.
l Logging is not available for Application Integration or the application links.
l To add custom messages to the log, see Log method of the Client object.

View Log with PowerUser


To view the log with PowerUser:
l On the View menu, point to Arrange Layout and then click Log.
The Log window can be floated or docked as described in the Accruent Meridian Enterprise User's
Guide.

Download Log with PowerWeb


To download the log with the PowerWeb:
1. Enable the Download Log menu command by creating or changing the CanDownloadLog setting to 1
in the user's PowerWeb profile file.
This is described in “Deploying standard preferences” in the Accruent Meridian Enterprise
Configuration Guide.
If the setting is 0 (default), the menu command is hidden.
2. Right-click to show the shortcut menu.

Confidential and Proprietary © 2021 12                                                           www.accruent.com


3. In the Miscellaneous group, click Download Log.
The file downloads to your browser where you can save and view it.

Confidential and Proprietary © 2021 13                                                           www.accruent.com


Microsoft Script Debugger
Debugging VBScript can be difficult and frustrating because the Meridian Enterprise Script Editor in
PowerUserMeridian does not have a built-in debugger. However, you can download and install the
Microsoft Script Debugger from the Microsoft Download Center. Although you cannot edit the Meridian
code blocks directly in the Microsoft Script Debugger, it allows you to:
l View VBScript code that has executed when a code error occurs
l View the current call stack
l Step into, over, and out of individual code statements
l Set breakpoints to stop execution
l Evaluate ad-hoc VBScript statements immediately
After installing the Microsoft Script Debugger, you can enable it in PowerUserMeridian as described in the
Accruent Meridian Enterprise User's Guide. This adds a Script Debugger item to the Tools menu from which
you can select:
l Open: Opens the debugger window with the Accruent VB Script code block loaded
l Break on Next Statement: Opens the debugger window with the code block loaded that is associated
with the next VBScript statement that is executed
The debugger window also opens when a code error occurs. When you find errors in your code, you must
edit it in the Configurator, save your changes, and reopen the vault to load the changed code.
For more information on using the Microsoft Script Debugger, see the Online Help in the debugger.

Confidential and Proprietary © 2021 14                                                           www.accruent.com


Configuration Expressions
Depending on the configuration option where it is used, VBScript is available for configuration expressions
to either calculate a value (file name, folder, property value, and so on) or to evaluate to True or False to
apply an option (input required, field visibility, field read-only, and so on). You can use VBScript expressions
in many places in a vault's configuration, including:
l Property pages
l Document naming
l Folder naming
l Lookup list tables and database queries
l Custom commands
l Workflow definitions
l Reports
l Document types
l Database Import Wizard
Each configuration expression is a single VBScript statement to be evaluated. Configuration expressions are
limited in that they:
l Cannot contain more than one line of code, although they can call a predefined function that
contains multiple lines of code.
l Cannot use variables.
l Should not execute other actions outside the scope of the current document, change property
values, invoke long-running functions, or invoke any user interface functions. Such actions can have
unexpected or unpredictable results.

You can use a VBScript expression anywhere you see the Meridian Enterprise Script Editor button in
Configurator. Clicking the button opens the Meridian Enterprise Script Editor where you can enter a
VBScript expression. For information about using the Meridian Enterprise Script Editor, see Understanding
the Meridian Enterprise Script Editor.

Confidential and Proprietary © 2021 15                                                           www.accruent.com


Meridian Object Model
Meridian provides VBScript objects to represent most vault objects, such as documents, folders, users,
and so on. These objects, in turn, provide related methods (actions) and properties (data) that you can use
to manipulate vault objects. Many of the parameters of the Meridian event procedures are objects. You
can view all of the Meridian objects, their methods, and properties with the Object Browser of the
Meridian Enterprise Script Editor. Some of the Meridian object properties and methods use one or more
predefined Meridian constants. The available Meridian constants can also be found in the Object Browser
in the Meridian Enterprise Script Editor.
The entire collection of interrelated objects are known as an object model. The objects of the Meridian
object model are described in the following topics.

Confidential and Proprietary © 2021 16                                                           www.accruent.com


Attachment Object
The Attachment object is a property of the Attachments object that represents an attachment of an email
message.

Attachment Object Properties


The Attachment object provides the following properties.

FilePath Property
The path of the file to attach to the current message object.

Syntax
FilePath As String

Name Property
Returns the name of the current object. Depending on the object type, this property returns the display
name of the object or it returns the internal name and may be read-only.

Syntax
Name As String

Remarks
If the current object is a Package, it must be in the Open status to set the value.
If the current object is a User, this property is the short name of the user as stored in the user's Meridian
account information and is read-only. This property can be used to specify the recipient's email address
and either an empty string or no value set in the Address property. If an email address is specified in Name,
it must be surrounded with carets (<>). When used with Microsoft Outlook, the Name property may
contain the user's full name or last name and Outlook will attempt to resolve the name to the email
address in the default address book. Meridian user names can be shown in different formats as specified by
the server registry setting UserNameFormat described in the Accruent Meridian Enterprise Administrator's
Guide.

Confidential and Proprietary © 2021 17                                                           www.accruent.com


Attachments Object
The Attachments object is a property of the MailMessage and NewMailMessage objects that is used to
manage the file attachments of email messages.

Attachments Object Properties


The Attachments object provides the properties described below.

Attachment Property
An object that represents an attachment to the message. Read-only.

Syntax
Attachment(Index) As IASMailAttachment

Count Property
Total number of attachments to the message. Read-only.

Syntax
Count As Long

Attachments Object Methods


The Attachments object provides the methods described below.

Add Method
Adds an attachment to the current NewMailMessage object.

Syntax
Add(FilePath As String, [Name As String])

Confidential and Proprietary © 2021 18                                                           www.accruent.com


Parameters

Name Description
FilePath The path of the file to attach to the current NewMailMessage object.
Name Optional name of the attachment.

Return Value
An Attachment object.

Remove Method
Removes an attachment from the current NewMailMessage object.

Syntax
Remove(Index)

Parameters

Name Description
Index A specific item in the attachments collection. Read-only.

RemoveAll Method
Removes all attachments from the current NewMailMessage object.

Syntax
RemoveAll()

Parameters
This method accepts no parameters.

Confidential and Proprietary © 2021 19                                                           www.accruent.com


Batch Object
The Batch object is passed as an argument to all event handlers. The same object is available for each event
in a batch operation.
Note:
l A single-document operation is treated as a batch with size 1.
l The Batch object is not supported by the CAD application links in remote mode.

Batch Object Properties


The Batch object provides the following properties, most of which are read-only. To affect some read-only
properties requires user interaction or custom event procedures.

Argument Property
A variable stored for the Batch object during the current batch operation. Arguments can be used to pass
parameters between procedures within the same batch operation.

Syntax
Argument(Name) As Variant
Following are the predefined, read-only Batch object arguments that you can use to obtain additional
information that may be useful when working with particular events.

Batch object arguments

Argument Description
Batch.Argument("__$$RelatedProjectCopy") A reference to the project copy
document that is being released as a
master document. Useful in the
DocGenericEvent_
BeforeNewDocument event to move
the master document to the correct
location if it is being created for the
first time.

Confidential and Proprietary © 2021 20                                                           www.accruent.com


Argument Description
Batch.Argument("__$$RelatedVaultDocument") A reference to a vault document that
corresponds to briefcase file. The
reference can be a ID string,
Document object, or AMDocument
object. Useful in the BrcEvent_
BeforeImport event to relate a vault
document to an incoming file.
Batch.Argument("DocumentPath") Provides the location of the document
in the local workspace starting from
the root of the vault.
This event will only process if the
NewLibraryComponentDocType
setting is disabled.
Batch.Argument("MatchedTypes") Provides a semicolon-delimited list of
internal type names matched to the
document extension.
This event will only process if the
NewLibraryComponentDocType
setting is disabled.

Remarks
The value of Name is case-sensitive.
For more information about arguments, see Object Arguments.

ApplyToAll Property
Indicates whether a user selected the Apply for all other documents of this type option that is shown on
wizard pages for batches of documents during custom command execution. The default is True.

Syntax
ApplyToAll As Boolean

Remarks
This property can be set in the <CommandName>_Initialize event using the constant AS_CONFIRM_
APPLY_FOR_ALL to specify whether the default behavior should be to apply a stored value to all
documents in the batch. The property can then be tested in the <CommandName>_BeforeWizard and
<CommandName>_AfterWizard events to determine if the wizard was shown, the user changed the
option, and if the properties on the wizard page have been applied to the first document in the batch and
will be applied to the next document in the batch.

Confidential and Proprietary © 2021 21                                                           www.accruent.com


In PowerWeb, the same result is achieved by setting
Batch.ApplyToAll to True in the relevant Initialize event the same result is achieved in PowerWeb.
For example:

Sub DocCopyMoveEvent_InitializeCopy(Batch, TargetFolder)


    Batch.ApplyToAll = True 'Apply to all option in wizard default on
End Sub

This works in all cases except Single Document Workflow (DocWorkflowEvent_InitializeChangeWFState)


and Configurable Workflow (DocCWFEvent_InitializeExecuteTransition).

BatchIndex Property
Index of the current item in a batch operation. Starts at 1. Read-only.

Syntax
BatchIndex As Long

BatchSize Property
Number of items in the current batch operation. Returns 1 for non-batch operations. Read-only.

Syntax
BatchSize As Long

ConfirmationTitle Property
The title of the current confirmation dialog box.

Syntax
ConfirmationTitle As String

Example
See Confirmation method

Confidential and Proprietary © 2021 22                                                           www.accruent.com


CountFailed Property
The number of operations in the current batch that failed. Read-only.

Syntax
CountFailed As Long

CountSucceeded Property
The number of operations in the current batch that succeeded. Read-only.

Syntax
CountSucceeded As Long

IsFirstInBatch Property
True only for the first item in a batch operation. True for single documents. Read-only.

Syntax
IsFirstInBatch As Boolean

IsLastInBatch Property
True only for the last item in a batch operation. True for single documents. Read-only.

Syntax
IsLastInBatch As Boolean

ProcessAsBatch Property
Set to True to indicate that the current (custom) command acts as a batch operation upon the members of
the Batch object. Set to False (default) to act only upon the selected document.
Note:
Set this property to True in the DocGenericEvent_PrepareCommand event before programmatically
adding documents with the Batch.AddDocuments method in a custom command's Initialize event.

Syntax
ProcessAsBatch As Boolean

Confidential and Proprietary © 2021 23                                                           www.accruent.com


Batch Object Methods
The Batch object methods affect the current batch operation. They are described below.

Abort Method
Abort the current batch operation.

Syntax
Abort([Message])

Parameters

Name Description
Message Show the specified message to the current user.

Remarks
Uncommitted items in the batch are revoked.

AddDocuments Method
Adds the members of the specified collection to the Batch object.

Syntax
AddDocuments(Collection As Object)

Parameters

Name Description
Collection A collection of documents to add to the Batch object. Can be the result of
Vault.FindDocuments or Document.GetReferences

Remarks
Not available in PowerWeb. This method is intended to be used in a custom command's Initialize event to
add documents to a batch for processing.

Confidential and Proprietary © 2021 24                                                           www.accruent.com


AddDocumentToBatch Method
Adds a specified document to the Batch object.

Syntax
AddDocumentToBatch(DocID As String)

Parameters

Name Description
DocID The DocID value of the document to add.

Remarks
Not available in PowerWeb. This method is intended to be used in a custom command's Initialize event to
add documents to a batch for processing.

AskConfirmation Method
Shows a confirmation prompt in the batch progress dialog with Yes and No radio buttons for answer
selection and an optional comment field.

Syntax
AskConfirmation(ID As String, Label As String, [Default as AS_
CONFIRMATION_DEFAULT_VALUE], [Comment As AS_CONFIRMATION_COMMENT_
FLAGS])

Parameters

Name Description
ID Identifier for this confirmation prompt that can be used to refer to the user's answer.
Label Text of the prompt.
Default Default radio button.
Comment Combination of flag values that determine whether comments are accepted and are
mandatory or optional.

Example
See Confirmation method

Confidential and Proprietary © 2021 25                                                           www.accruent.com


AskInput Method
Shows an input field in the batch progress dialog.

Syntax
AskInput(ID As String, Label As String, [Type as AS_INPUT_RESULT_
TYPE], [Rule As AS_INPUT_VALIDATION_RULE], [Prototype As String])

Parameters

Name Description
ID Identifier for this input field that can be used to refer to the user's answer.
Label Text of the field label.
Type Optional value that represents the type of input that is accepted.
Rule Optional value that represents the type of input validation performed.
Prototype Optional name of an existing custom property from which to inherit the property's
validation rules.

Example
See Confirmation method

Confirmation Method
Shows a custom confirmation dialog. This method should not be confused with the Confirmation Property.

Syntax
Confirmation(ID As String)

Parameters

Name Description
ID Identifier of the content to show in the dialog.

Return Value
Object with two properties, the user's input in Value and the user's comment (if any) in Comment.

Confidential and Proprietary © 2021 26                                                           www.accruent.com


Remarks
Confirmation dialog boxes are not supported if the ActiveX compatibility mode option is enabled as
described in the Personal Preferences article in the Meridian Enterprise User's Guide. The available
constants can be found in the Constants branch of the Object Browser in the Meridian Enterprise Script
Editor.

Confidential and Proprietary © 2021 27                                                           www.accruent.com


Example

Sub DocCWFEvent_InitializeExecuteTransition(Batch, Transition, Person,


Manager, Comment)
    Batch.ConfirmationTitle = "Set Due Date"
    Batch.ShowInfo "Proceeding will make all of the selected documents" +
vbCrLf + _
"due on the date you enter." + vbCrLf + CStr(Batch.BatchSize) + "
document(s)", _
"Enter Due Date"
    Batch.AskConfirmation "C1", "Do you want to continue the operation?",
AS_CDV_YES , _
    AS_COMMENT_MANDATORY_YES 
    Batch.AskInput "I1", "Due date:", AS_vbDate, AS_COMMENT_MANDATORY_NO
End Sub

Sub DocCWFEvent_BeforeExecuteTransition(Batch, Transition, Person,


Manager, Comment)
Set res = Batch.Confirmation("C1")
If res Is Nothing Then
Batch.PrintDetails "Prompt 1 result is null"
Else
Batch.PrintDetails "Prompt 1: " + CStr(res.Value) + " Comment: " +
res.Comment
End If
Set res2 = Batch.Confirmation("I1")
If res2 Is Nothing Then
Batch.PrintDetails "Input 1 result is null"
Else
Batch.PrintDetails "Input 1: " + CStr(res2.Value) + " Comment: " +
res2.Comment
End If
End Sub

Confidential and Proprietary © 2021 28                                                           www.accruent.com


FailCurrent Method
Fail the current item in the current batch operation.

Syntax
FailCurrent([Message])

Parameters

Name Description
Message Append the specified message to the Comments property.

Remarks
Important!
Use this method very carefully in managed change and Meridian Advanced Project Workflow operations,
batch operations, or if references are involved. It could cause unexpected results.
For example, if a project copy is made of a master document that has a reference to another document
and the operation is canceled by validation in script, the referenced document might still be copied but
without the reference (because the master document was not copied). If the successful project copy is
then released as a master revision, the existing reference between the source documents will be deleted
(because the project copy had no reference to the master document).
In such scenarios, the validation script should produce a different result than aborting the operation,
such as setting the target folder to Nothing, which prevents copying the referenced document.

Input Method
Shows the specified confirmation content.

Syntax
Input(ID As String) As Object

Parameters

Name Description
ID Identifier of the content to show in the dialog box.

Return Value
Object with two properties, the user's input in Value and the user's comment (if any) in Comment.

Confidential and Proprietary © 2021 29                                                           www.accruent.com


Example
See Confirmation method

PrintDetails Method
Shows a string in the batch progress dialog box.

Syntax
PrintDetails(String As String)

Parameters

Name Description
String The text string to show in the progress dialog box.

Remarks
To add a string to a the Comment log of a document, use the Document.Log method instead as described
in Log method.
Note:
In Meridian 2021, event scripts such as this one do not work where focus is set on the folder level and a
create a new document command for document type with wizard page (without template) is used.

1 Sub DocGenericEvent_BeforeNewDocument(Batch, Action, SourceFile,


DocType, DocTemplate)
2 batch.PrintDetails "BeforeNewDocument"'(Document.FileName) 'Add your
code here
3 End Sub

In this scenario, the document is created, but the focus remains on folder level and the navigation view is
not refreshed. This will be fixed in a future release.

ShowInfo Method
Shows one or more lines of text with an optional heading in a confirmation dialog. The first 5 lines of text
are visible by default with a vertical scroll bar if more lines exist.

Confidential and Proprietary © 2021 30                                                           www.accruent.com


Syntax
ShowInfo(Info As String, Heading As String)

Parameters

Name Description
Info Text of the information.
Heading Text of the heading.

Example
See Confirmation method

Confidential and Proprietary © 2021 31                                                           www.accruent.com


BCPropStorage Object
The BCPropStorage object represents the property information that was read by the DocCADLink_
AfterReadMTBProperties event or that will be written by the DocCADLink_BeforeWriteMTBProperties
event.

BCPropStorage Object Properties


The BCPropStorage object provides the following properties, all of which are read-only.

LayoutsNames Property
Gets the names of the page layouts in the current document.

Syntax
LayoutsNames As String
Returns
An array of names as strings.

Remarks
Use this property to retrieve the layout names to present to the user for selecting the layouts to render
with the MeridianQueue.RegisterDocument property. Pass the selected layout names in the
publishOptions parameter using the _RENDERLAYOUTS_ option described in the AccruentMeridian
Enterprise Server Administrator's Guide.
This property can also be used to access the data in multiple title blocks defined in a single drawing. For an
example of usage, see DocCADLink_AfterReadMTBProperties event.
This property is intended for AutoCAD and Revit drawings only. If the document does not contain multiple
title blocks or sheet properties with the names configured in the application link (AutoCAD or Revit tabs,
respectively) settings of the vault configuration, the returned array is empty.

BCPropStorage Object Methods


The BCPropStorage object methods affect the current BCPropStorage object. They are described below.

GetColumnDefs Method
Returns a collection of the specified data columns from the data table shown on the Title Blocks page by
the CAD link after reading a title block from a drawing layout.

Confidential and Proprietary © 2021 32                                                           www.accruent.com


Syntax
GetColumnDefs(CollectionType As Integer)

Parameters

Name Description
CollectionType One of the following numeric values:
1 — only the mandatory layout and block name columns
2 — only the columns mapped in the link configuration
3 — all columns

Return Value
A collection of column definition objects. Each object has the following properties:
l Name — internal name of the column
l DispName — display name of the column
l PropType — one of the following property value types:
o 0 — string

o 1 — integer

o 2 — date

o 3 — real number

o 4 — Boolean

l Direction — one of the following property update directions as specified by the CAD link
configuration:
o 0 — any direction

o 1 — from Meridian to the document

o 2 — from the document to Meridian

l Hidden — indicates whether the column is hidden in the table


l Order — column display order in the table

Remarks
Use this method to access the data in multiple title blocks defined in a single drawing. For an example of
usage, see DocCADLink_AfterReadMTBProperties event.

Confidential and Proprietary © 2021 33                                                           www.accruent.com


Property Method
Returns an object that represents data stored in the title block data table for the specified property.

Syntax
Property(LayoutName As String, ColumnName As String)

Parameters

Name Description
LayoutName Name of layout that contains a linked title block with the specified column name.
ColumnName Internal name of the column in the data table shown on the Title Blocks page by the
CAD link for the specified drawing layout.

Return Value
The returned object has the following properties:
l Value — the read-write value of the specified property
l ColumnDef — a column definition object for the column that contains the value as described in
GetColumnDefs method

Remarks
Use this method to access the data in multiple title blocks defined in a single drawing and to set attribute
values (optional). For an example of usage, see DocCADLink_AfterReadMTBProperties event.

Confidential and Proprietary © 2021 34                                                           www.accruent.com


Briefcase Object
The Briefcase object represents a briefcase file. The Briefcase object is available to the briefcase event
procedures and to the current Document object.

Briefcase Object Properties


The Briefcase object provides the following properties, most of which are read-only. To affect some read-
only properties requires user interaction or custom event procedures.

MailMessage property
An object that represents a mail message for the current Briefcase object.

Syntax
MailMessage As IASMailMessage

Remarks
Not available in PowerWeb.

Path Property
The path of the current briefcase file.

Syntax
Path As String

Remarks
Not available in PowerWeb.

Property Property
The value of a specified briefcase property (String).

Syntax
Property (Name) As String

Confidential and Proprietary © 2021 35                                                           www.accruent.com


Remarks
Not available in PowerWeb.

SkipCurrentDocContent Property
Used by the Global Collaboration Framework.

Syntax
SkipCurrentDocContent As Boolean

Remarks
Not available in PowerWeb.

TemplateName Property
The name of the template from which the current briefcase was created.

Syntax
TemplateName As String

Remarks
Not available in PowerWeb.

Transmittal Property
A Document object that has been copied to the briefcase.

Syntax
Transmittal As IASDocument5

Remarks
Not available in PowerWeb.

Confidential and Proprietary © 2021 36                                                           www.accruent.com


Briefcase Object Methods
The Briefcase object methods affect the current Briefcase object. They are described below.

Archive Method
Builds (or rebuilds) the current briefcase file.

Syntax
Archive()

Parameters
This method accepts no parameters.

Return Value
The briefcase filename.

Remarks
Not available in PowerWeb. The briefcase file is built by the executable specified for the briefcase template.

GenerateTransmittalSheet Method
Generates a transmittal sheet for the current briefcase file from a specified report template.

Syntax
GenerateTransmittalSheet(TemplateName)

Parameters

Name Description
TemplateName Name of the report template to make the transmittal sheet.

Remarks
Not available in PowerWeb.

Confidential and Proprietary © 2021 37                                                           www.accruent.com


Client Object
The Client object represents the current client application (for example, PowerUserMeridian).

Client Object Properties


The Client object provides the following properties.

Argument Property
A variable stored with the Client object for as long as the current client session is active. Arguments can be
shared by all instances of the client application on the same computer. 

Syntax
Argument(Name) As Variant

Remarks
The value of Name is case-sensitive.
Following are the predefined, read-only Client object arguments that are set by MS Outlook and IBM Lotus
Notes application links when email messages are stored in a vault. You can use these arguments to obtain
additional information that may be useful when working with particular events. The value of each
argument is evident from the argument name.
l AttachmentName
l AttachmentsCount
l BCC
l BodyFormat
l CC
l ConversationIndex
l ConversationTopic
l CRC32
l CreatingTime
l EntryID
l Importance
l MAPIFolder
l ReadReceiptRequested
l ReceivedByName
l ReceivedTime

Confidential and Proprietary © 2021 38                                                           www.accruent.com


l Saved
l SenderEmailAddress
l SenderName
l Sent
l SentOn
l Size
l Subject
l To
l UnRead
For more information about arguments, see Object Arguments.

BuildNr Property
The version number of the AmEdmUI.dll client library file.

Syntax
BuildNr As String

Remarks
Returns the same number regardless of the active client application. This property can be used to detect
outdated client software installations.

ClientID Property
A number that represents the active client applications for the current transaction. The number is the sum
of one or more AS_CLIENTID constants.

Syntax
ClientID As Long

ClientProductCode Property
Number that represents the client product. Read-only.

Syntax
ClientProductCode As String

Confidential and Proprietary © 2021 39                                                           www.accruent.com


Confirmation Property
Set this property to True or False to control the display of confirmation prompts that appear to users for
some commands. Action is specified as one of the AS_CONFIRM_ACTION constants that corresponds to
the prompt that you want to enable or disable, respectively. The available constants can be found in the
Constants branch of the Object Browser in the Meridian Enterprise Script Editor.

Syntax
Confirmation(Action) As Boolean

Remarks
In PowerWeb, client confirmation is supported for these actions:
l AS_CONFIRM_COPYFPRSUBLEVELS – Defines what to do with FPR properties during project copy
creation.
l AS_CONFIRM_ALLOW_SKIPWIZARD_ALL – Partly supported for workflow transition wizards. Not
supported for new document/folder wizards and auto command wizards.
l AS_CONFIRM_APPLY_FOR_ALL – Partly supported for workflow transition wizards. Not supported
for new document/folder wizards and auto command wizards.
l AS_CONFIRM_COPY_FOLDER – Use the DocGenericEvent_SelectTarget event.
l AS_CONFIRM_IMPORT_FOLDER – Use the DocGenericEvent_SelectTarget event.
l AS_CONFIRM_PROJECT_FOLDER – Use the DocGenericEvent_SelectTarget event.

CurrentScope Property
Name of the current scope.

Syntax
CurrentScope As String

CurrentView Property
Name of the active navigation view. Read-only.

Syntax
CurrentView As String

Remarks
This property is not supported in PowerWeb.

Confidential and Proprietary © 2021 40                                                           www.accruent.com


ImportDetails Property
Long integer that represents one or more AS_IMPORT_DETAILS constants. This property is set only when
the ImportType property contains a valid value. Read-only.

Syntax
ImportDetails As AS_IMPORT_DETAILS

ImportType Property
Long integer that represents one or more AS_IMPORTTYPE constants. Available only for new documents.
Read-only.

Syntax
ImportType As AS_IMPORTTYPE

Type Property
The client application platform. Returns HTML for PowerWeb. Read-only.

Syntax
Type As String

Viewer Property
See Viewer Object. Read-only.

Syntax
Viewer As IASViewer

Client Object Methods


The Client object methods affect the current client application. The client application executes these
methods only after the current operation (and all its event procedures) have finished. These commands
may invoke new events.
The Client object methods are described below.

GoTo Method
Select the specified object. Makes the specified object the current object.

Confidential and Proprietary © 2021 41                                                           www.accruent.com


Syntax
GoTo(Document/Folder)

Parameters

Name Description
Document/Folder Document or Folder object to make the selected object.

Remarks
The method is available in PowerWeb with these limitations:
l If the target document or folder is not visible in the current Scope, the Client.Goto statement is
ignored.
l If the target document or folder is not visible in the view, PowerWeb switches to the Explorer view.
l In ActiveX mode, Client.Goto is ignored.

GoToView Method
Shows the specified view.

Syntax
GoToView(ViewName)

Parameters

Name Description
ViewName Name of the Navigation view to make the current view.

Remarks
Not available in PowerWeb.

Log Method
Sends a message to the VBScript debugging log.

Syntax
Log(Flags As AS_LOG_FLAGS, Message As String, [Source As String])

Confidential and Proprietary © 2021 42                                                           www.accruent.com


Parameters

Name Description
Flags Long integer that represents one or more of the AS_LOG_FLAGS constants.
Note:
You define the meaning of each of the AS_LOG_FLAGS constants. They are only provided as
a convenience for filtering the log and have no other effect than the icons shown for the log
entries. Use AS_LF_DEBUG to limit logging to debug mode. Use AS_LF_MASK to combine
constants.
Message Text to send to the log.
Source Optional name of the source of the message.

Remarks
Not available in PowerWeb. To configure and view the log, see Debugging VBScript.

NewMailMessage Method
Creates a new email message object.

Syntax
NewMailMessage() As IASMailMessage

Parameters
This method accepts no parameters.

Return Value
A new MailMessage object as described in MailMessage Object.

Remarks
Not available in PowerWeb.

OpenInApplication Method
Opens the specified document in the application that is registered in Windows for the document's file
extension.

Confidential and Proprietary © 2021 43                                                           www.accruent.com


Syntax
OpenInApplication(Document)

Parameters

Name Description
Document An object that represents the document to open.

Remarks
Not available in PowerWeb.

Refresh Method
Refreshes the client application.

Syntax
Refresh(Flags As AS_REFRESHFLAG)

Parameters

Name Description
Flags Long integer that represents one or more of the AS_REFRESHFLAGS constants.

Remarks
Not available in PowerWeb.

Confidential and Proprietary © 2021 44                                                           www.accruent.com


Document Object
The Document object refers to the selected document and is available to all event procedures that apply to
documents. The Document object is not passed as a parameter to most event procedures.

Confidential and Proprietary © 2021 45                                                           www.accruent.com


Document Object Properties
The Document object provides the following properties, most of which are read-only. To affect some read-
only properties requires user interaction or custom event procedures.

BriefCase Property
An object that represents a briefcase. If the parent object is a document, this is the briefcase to which the
document is locked. If the parent object is a report (transmittal sheet), this is the briefcase that contains
the report. Read-only.

Syntax
BriefCase As IASBriefCase

CanEditProperty Property
True if the user can edit this property, False if editing is not allowed. Read-only.

Syntax
CanEditProperty As Boolean

ConcurrentEngineeringRuleProperty Property
Specifies the way in which documents are locked when waiting lists are in use for project copies. The
constant AS_CE_Rule contains enumerations of behaviors that you can specify for a project copy:
l AS_CER_DEFAULT — default behavior
l AS_CER_MERGE_WF — current behavior
l AS_CER_NOT_ALLOWED — allow only one project copy
l AS_CER_SERIAL_WITH_RELEASE — allow multiple project copies
l AS_CER_SERIAL_WITH_TRANSFER — reserved for future use
Note:
If you want to change the concurrent engineering rule for a document that is in progress using script, you
must add the ConcurrentEngineeringRule property to the SafeProperties registry setting. This setting is
described in the HKEY_LOCAL_MACHINE\Software\Cyco\AutoManager
Meridian\CurrentVersion\AMOMLUI\SafeProperties article in the Meridian Enterprise Administrator's
Guide.

Confidential and Proprietary © 2021 46                                                           www.accruent.com


Syntax
CanEditProperty As AS_CE_RULE

Created Property
The date and time when the document was created. Read-only.

Syntax
Created As Date

CreatedBy Property
An object that represents the person who created the document. Read-only.

Syntax
CreatedBy As IASUser

CWFManagers Property
The names of the users assigned as the workflow definition managers of the document. Read-only.

Syntax
CWFManagers As String

CWFState Property
An object that represents the current workflow definition state of the document. Read-only.

Syntax
CWFState As IASWorkflowState

Confidential and Proprietary © 2021 47                                                           www.accruent.com


CWFTodoPersons Property
The names of the users assigned as the to-do persons of the document. Read-only.

Syntax
CWFTodoPersons As String

DocumentType Property
An object that represents the document type of the document. Read-only.

Syntax
DocumentType As IASDocumentType

FileName Property
The file name (Display Name property) of the document or briefcase.

Syntax
FileName As String

Remarks
For events to occur when setting this property for a document, the RenameEvents setting in the
[ScriptEvents] section on the Application Integration tab of Application Settings in Configurator must be
set to Y. The default is N.

FileType Property
The file type (as registered in Windows on the current computer) of the document. Read-only.

Syntax
FileType As String

Confidential and Proprietary © 2021 48                                                           www.accruent.com


ForgeURL property
The URL to view the current document in Autodesk Forge. Can be modified with ChangeForgeURL Method.

Syntax
ForgeURL As String

GlobalID Property
The ID of the document that is unique among all vaults. Read-only.

Syntax
GlobalID As String

HasIncomingReferences Property
True if the document has incoming Meridian references. Read-only.

Syntax
HasIncomingReferences As Boolean

HasOutgoingReferences Property
True if the document has outgoing Meridian references. Read-only.

Syntax
HasOutgoingReferences As Boolean

HasRedlines Property
True if the document has Meridian redlines attached to it. Read-only.

Syntax
HasRedlines As Boolean

Confidential and Proprietary © 2021 49                                                           www.accruent.com


HasRendition Property
This property is now obsolete. Use RenditionStatus Property instead.

HasRenditionRedlines Property
True if the rendition of the document has Meridian redlines attached to it. Read-only.

Syntax
HasRenditionRedlines As Boolean

HybridParts Property
A list of the hybrid part document names.

Syntax
HybridParts() As Array

ID Property
Returns the ID of the current object. The value is unique within the current vault. For the ID value that is
unique among all vaults, retrieve the GlobalID property value, if available. Read-only.

Syntax
ID As String

ImportType Property
Long integer that represents one or more AS_IMPORTTYPE constants. Available only for new documents.
Read-only.

Syntax
ImportType As AS_IMPORTTYPE

Confidential and Proprietary © 2021 50                                                           www.accruent.com


IsChangedByPortal Property
True if the document returned from Meridian Portal is changed. Read-only.

Syntax
IsChangedByPortal As Boolean

Example
This sample code releases a quick change if the document was not changed in Meridian Portal.

Sub ImportPackage_ChangeState (package, previousState, User)


Dim Doc, arrDoc, i   
If package.Status = AS_IPS_Imported Then
    arrDoc = Package.GetDocuments()   
For i = 0 To Ubound(arrDoc)
Set Doc = Vault.GetDocument(arrDoc(i))
If Doc.Property("AMDocumentPropertySet._ISCHANGEDBYPORTAL") =
False Then
' revoke quick change
Doc.RevokeChange
End If
Next
End If
End Sub

IsUnderRevision Property
True if a working copy exists for the current document. Read-only.

Syntax
IsUnderRevision As Boolean

Confidential and Proprietary © 2021 51                                                           www.accruent.com


IsUniqueValue Property
True if the specified value for the specified document property is unique within the current vault. Read-
only.

Syntax
IsUniqueValue(PropertyName, Value) As Boolean

LayerTranslationTable Property
Layer translation table to use for translating the document layers when generating a PDF rendition from
the document. Translation tables are created by your administrator in the Meridian Enterprise Server
Administration Console.

Syntax
LayerTranslationTable As String

LayoutsNames Property
Gets the names of the page layouts in the current document.

Syntax
LayoutsNames As String

Returns
An array of names as strings.

Remarks
Use this property to retrieve the layout names to present to the user for selecting the layouts to render
with the MeridianQueue.RegisterDocument property. Pass the selected layout names in the
publishOptions parameter using the _RENDERLAYOUTS_ option described in the AccruentMeridian
Enterprise Server Administrator's Guide.
This property can also be used to access the data in multiple title blocks defined in a single drawing. For an
example of usage, see DocCADLink_AfterReadMTBProperties event.
This property is intended for AutoCAD and Revit drawings only. If the document does not contain multiple
title blocks or sheet properties with the names configured in the application link (AutoCAD or Revit tabs,
respectively) settings of the vault configuration, the returned array is empty.

Confidential and Proprietary © 2021 52                                                           www.accruent.com


LockingProjectCopy Property
 A Document object that represents the project copy that is locking the selected document. Read-only.

Syntax
LockingProjectCopy As IASDocument5

MasterDocument Property
A Document object that represents the master document from which the current project copy document
was copied. Read-only.

Syntax
MasterDocument As IASDocument5

Modified Property
The date and time when the document content was last modified. Read-only.

Syntax
Modified As Date

ModifiedBy Property
An object that represents the person who last modified the document content. Read-only.

Syntax
ModifiedBy As IASUser

ParentFolder Property
An object that represents the parent folder of the document. Read-only.

Syntax
ParentFolder As IASFolder3

Confidential and Proprietary © 2021 53                                                           www.accruent.com


ParentProject Property
A Folder object that represents the parent project that contains the current project copy document. Read-
only.

Syntax
ParentProject As IASFolder3

Path Property
The relative path of the document from the root of the vault. Read-only.

Syntax
Path As String

ProjectCopy Property
An object that represents a project copy of the selected document. Read-only.

Syntax
ProjectCopy As IASProjectCopy

Property Property
Gets or sets the value of the specified (String) document property.

Syntax
Property(Name) As Variant

Rendition Property
The vault or Local Workspace path of the document and its rendition. Read-only.

Syntax
Rendition As String

Confidential and Proprietary © 2021 54                                                           www.accruent.com


RenditionStatus Property
The status of the current rendition stored in the vault. The property contains a long integer that represents
one or more AS_RENDITION_STATUS constants. Read-only.

Syntax
RenditionStatus() As AS_RENDITION_STATUS

Remarks
When the content of the source document is replaced by a user, this property returns AS_RS_OUTDATED.

Revision Property
The revision number of the document.

Syntax
Revision As String

ShareID Property
A server ShareID to get a transaction object from another process. Read-only.

Syntax
ShareID As String

Size Property
The file size of the document content. Read-only.

Syntax
Size As Long

Confidential and Proprietary © 2021 55                                                           www.accruent.com


StatusText Property
The text of the document's current workflow Status property.

Syntax
StatusText As String

UnderRevisionBy Property
An object that represents the user who owns the working copy of the document. Read-only.

Syntax
UnderRevisionBy As IASUser

VersionID Property
The ID of the current revision of the document that is unique within the current vault. Read-only.

Syntax
VersionID As String

WorkFlowAction Property
The action that the current to-do person is assigned to perform on the document. Read-only.

Syntax
WorkFlowAction As String

WorkFlowManager Property
An object that represents the user assigned to manage the current document type workflow of the
document. Read-only.

Syntax
WorkFlowManager As IASUser

Confidential and Proprietary © 2021 56                                                           www.accruent.com


WorkflowState Property
An object that represents the current workflow state of the current workflow object. Read-only.

Syntax
WorkflowState As IASWorkflowState

WorkFlowTodoPerson Property
An object that represents the user assigned as the to-do person of the document in the current document
type workflow state. Read-only.

Syntax
WorkFlowTodoPerson As IASUser

Confidential and Proprietary © 2021 57                                                           www.accruent.com


Document Object Methods
The Document object methods affect the current document object.

AddRendition Method
Adds rendition content from the specified file to the current document.

Syntax
Sub AddRendition (File As String, [NewRevision As Boolean = True])

Parameters

Name Description
File Path to a file outside the vault to import as rendition content for the current document.
NewRevision If True (default), creates a new revision of the rendition.

Remarks
Rendition revisions are separate from the parent document revisions. They need not be synchronized and
there may be many of one related to one of the other.

AddReorderingComment Method
Adds a reordering comment to the Project Copy.

Syntax
AddReorderingComment(reorderingComment as String)

Parameters

Name Description
reorderingComment A string containing the comment to be added to the
project copy.

Confidential and Proprietary © 2021 58                                                           www.accruent.com


ApplyPropertyValues method
Saves the current property values to the current document object.

Syntax
ApplyPropertyValues()

Parameters
This method accepts no parameters.

AttachWaitingProjectCopy Method
Attaches an existing document as a waiting Project Copy. This updates waiting priority and retains the
creation date of the existing document. You can also use the AddReorderingComment method to add a
reordering comment to the Project Copy.

Syntax
AttachWaitingProjectCopy(ProjectCopy as Object) As IASDocument15

Parameters

Name Description
ProjectCopy An object representing the project copy to which the document is to be attached.

CalculateFileType method
Resets the FileType property of the current document object.

Syntax
CalculateFileType()

Parameters
This method accepts no parameters.

Confidential and Proprietary © 2021 59                                                           www.accruent.com


CallRemote Method
Executes a remote procedure call.

Syntax
CallRemote(URL As String, Username As String, _
Password As String, RemoteVault As String, _
Script As String, [Args], [Flags As Long = 2])

Parameters

Name Description
URL Location of the server with which to connect.
Username User account to use to connect to the server.
Password Password of the user account.
RemoteVault Name of the remote vault with which to connect.
Script Name of the procedure to execute on the remote server.
Args Optional arguments for the procedure to execute.
Flags Optional flags from the AS_CALLREMOTE_FLAGSS enumeration.

Example
The following examples show how to use this method.
Example function defined in the called vault:
Function RemoteTest (First, Second, Third)
RemoteTest = "RemoteTest returns: " & First & ", " & Second & ", " &
Third
End Function
Example procedure defined in the calling vault:
Sub Test_Execute(Batch)
vArg = Array ("One ", "Two", "Three")
vRes = Vault.CallRemote ("http://MyServer/Meridian", "MyUserName", _
"MyPassword", "MyVaultName", "RemoteTest", VArg, AS_CRF_
MULTIARGS)
WinMsgBox vRes
End Sub

Confidential and Proprietary © 2021 60                                                           www.accruent.com


ChangeDocumentType Method
Changes the document type of the current document object.

Syntax
ChangeDocumentType(DocType)

Parameters

Name Description
DocType An object that represents the new document type

Remarks
For events to occur for this method, the ChangeDocTypeEvents setting in the [ScriptEvents] section on the
Application Integration tab of Application Settings in Configurator must be set to Y(default).

ChangeForgeURL Method
If a rendition is already available in Autodesk Forge, changes the ForgeURL property of the document based
on the parts that you specify.

Syntax
ChangeForgeURL(ForgeURL1, ForgeURL2)

Parameters

Name Description
ForgeURL1 A string that represents the first part of the Forge URL for the document, for example, the
base URL.
ForgeURL2 A string that represents the second part of the Forge URL for the document, for example,
the Forge file ID.

Confidential and Proprietary © 2021 61                                                           www.accruent.com


ChangeManager Method
Changes the workflow manager of the document type workflow of the current document object.

Syntax
ChangeManager(User As String)

Parameters

Name Description
User The user name of the new workflow manager

Remarks
For events to occur for this method, the SDWFEvents setting in the [ScriptEvents] section on the
Application Integration tab of Application Settings in Configurator must be set to Y. The default is N.

ChangeTodoPerson Method
Changes the to-do person of the document type workflow of the current document object.

Syntax
ChangeTodoPerson(User As String, Comment As String)

Parameters

Name Description
User The user name of the new workflow manager
Comment The comment to append to the comment log

Remarks
For events to occur for this method, the SDWFEvents setting in the [ScriptEvents] section on the
Application Integration tab of Application Settings in Configurator must be set to Y. The default is N.

Confidential and Proprietary © 2021 62                                                           www.accruent.com


ChangeWorkflowState Method
Changes the document type workflow state of the current document object.

Syntax
ChangeWorkflowState(NewWorkflowState As AS_WF_STATE, User As String,
Comment As String)

Parameters

Name Description
NewWorkflowState Long integer that represents one or more AS_WF_STATE constants
User The user name to assign as the new to-do person
Comment The comment to append to the comment log

Remarks
For events to occur for this method, the SDWFEvents setting in the [ScriptEvents] section on the
Application Integration tab of Application Settings in Configurator must be set to Y. The default is N.

ClearRedlines Method
Clears the current redlines of the document object. If the document includes a rendition, its redlines are
also deleted.

Syntax
ClearRedlines()

Parameters
This method accepts no parameters.

CreateWaitingProjectCopy Method
Adds the document as a new waiting Project Copy to the waiting list if the document is a master document
with concurrent engineering options which allow creation of a waiting Project Copy. All properties in
custom property sets are copied from the master document to the new Project Copy. Waiting project
copies are created in the workflow state Unchanged.

Confidential and Proprietary © 2021 63                                                           www.accruent.com


Syntax
CreateWaitingProjectCopy(TargetProject as IASFolder9) As IASDocument15

Parameters

Name Description
TargetProject A project folder where the waiting project copy is to reside.

ConfirmMerged Method
Prompts the user to confirm that the selected project copy document has been merged with the master
document.

Syntax
ConfirmMerged()

Parameters
This method accepts no parameters.

ConfirmSuperceded Method
Prompts the user to confirm that the selected project copy document has been superceded by changes
made to the master document.

Syntax
ConfirmSuperceded()

Parameters
This method accepts no parameters.

ContentFromReport Method
Replaces content of the document with the output of the report with the specified name, scope, and
template. This only works for reports that generate HTML content. You can use this method in a custom
command.

Confidential and Proprietary © 2021 64                                                           www.accruent.com


Note:
We recommend that you do not use this for locked documents as it can result in the new report being
lost.

Syntax
ContentFromReport(ReportName as String, ReportScope, TemplateName as
String)

Parameters

Name Description
ReportName Internal name of the report definition.
ReportScope Array of document IDs that represents the scope of the report.
TemplateName XLST stylesheet to use for the report.

CopyProperties Method
Copies all of the property values of the current document to a specified document except for an optional
array of property names.

Syntax
CopyProperties(PropertySetName As String, TargetDocument As Document,
[ExcludeProperties] As String)

Parameters

Name Description
PropertySetName Name of the property set to copy.
TargetDocument Document object to which to copy the properties.
ExcludeProperties Optional one dimension array of a property names to exclude from copying.

Remarks
The following example copies all properties in the property set MyPropSet to the specified document
object except for the properties named Prop1 and Prop2.
Document.CopyProperties "MyPropSet", Document, Array("Prop1", "Prop2")

Confidential and Proprietary © 2021 65                                                           www.accruent.com


CreateHybridPart Method
Creates a hybrid for the current document with the specified name. After creation, content for the new
hybrid part can be loaded with the LoadFromFile or LoadFromTemplate methods.

Syntax
CreateHybridPart(PartName as String) As IASDocument11

Parameters

Name Description
PartName The name with which to create the new hybrid part.

Return Value
A new Document object.

Remarks
Use this method to create a new hybrid part before loading file content with the LoadFromFile or
LoadFromTemplate methods. Consider using the ImportHybridPart method instead.
For events to occur for this method, the HybridEvents setting in the [ScriptEvents] section on the
Application Integration tab of Application Settings in Configurator must be set to Y (default).

Delete Method
Deletes the current document.

Syntax
Delete()

Parameters
This method accepts no parameters.

Remarks
The confirmation dialogs that are normally shown during document deletion can be suppressed as
described in Confirmation property.

Confidential and Proprietary © 2021 66                                                           www.accruent.com


DeleteHotspots method
Deletes the type of hotspots that you specify.

Syntax
DeleteHotspots(AS_HOTSPOTS_TYPE)

Parameters

Name Description
AS_ An enumeration that determines whether to delete manual or automatic hotspots. You
HOTSPOTS_ can use AS_HOTSPOTS_MANUAL Or AS_HOTSPOTS_AUTOMATIC
TYPE

DeleteHybridPart Method
Deletes the hybrid part of the current document with the specified name.

Syntax
DeleteHybridPart(PartName as String)

Parameters

Name Description
PartName The name of the hybrid part to delete.

Remarks
For events to occur for this method, the HybridEvents setting in the [ScriptEvents] section on the
Application Integration tab of Application Settings in Configurator must be set to Y (default).

DeleteRendition Method
Deletes the content of the current rendition revision for the current document.

Syntax
Sub DeleteRendition()

Confidential and Proprietary © 2021 67                                                           www.accruent.com


Parameters
This method accepts no parameters.

Remarks
This method does not actually delete the rendition file but marks it as deleted. The Document.Rendition
property will then return the path of the orphaned file.

ExecTransition Method
Executes the specified workflow definition transition for the current document object.

Syntax
ExecTransition(WorkflowTransition As IASWorkflowTransition, [Comments
As String], [TodoPersons As String])

Parameters

Name Description
WorkflowTransition An object that represents the workflow definition transition to execute
Comments Optional comments to append to the comment log
TodoPersons Optional user names to assign as the new to-do persons

Remarks
l For events to occur for this method, the CWFEvents setting in the [ScriptEvents] section on the
Application Integration tab of Application Settings in Configurator must be set to Y (default).
l Wizard pages are not shown when this method is invoked. Property value assignments should be
performed by script instead.
l If the Release project copies of documents as master revisions option of a workflow transition is
enabled and the transition changes the status of the document to Released, executing the transition
on a project copy with this method will create a new revision of the project copy as expected but it
will not release it as a new master document revision.

Confidential and Proprietary © 2021 68                                                           www.accruent.com


ExportRendition Method
Exports the content of the current rendition revision for the current document to a specified file.

Syntax
Sub ExportRendition (File As String)

Parameters

Name Description
File Path and filename outside the vault where to export the rendition content of the current
document.

ExtractTags Method
Gets text strings from the full-text index of the current document that match the specified regular
expression.

Syntax
ExtractTags(RegExp)

Parameters

Name Description
RegExp A regular expression that matches the text strings to be found in the full-text index of vault
documents.
For help calculating a regular expression, see Regular Expression Language - Quick Reference in
the MSDN Library.

Return Value
An array of text tokens that match the specified regular expression.

Remarks
This method is intended for finding object tag IDs for use with the Meridian Asset Management Module.
This method is equivalent to the Regular Expression option described in the Accruent Meridian Asset

Confidential and Proprietary © 2021 69                                                           www.accruent.com


Management Module Administrator's Guide that is used with the text tags functionality described in the
Accruent Meridian Asset Management Module User's Guide.

GetExpectedTransitionResult Method
Returns the expected result of executing the specified workflow definition transition for the current
document object.

Syntax
GetExpectedTransitionResult(Transition As IASWorkflowTransition) As
AS_WORKFLOW_TRANS_RES

Parameters

Name Description
Transition An object that represents the workflow definition transition to execute

Return Value
Returns a long integer that is equivalent to one or more of the AS_WORKFLOW_TRANS_RES constants that
represents the expected results. Use this method to determine the current consensus status of parallel
workflows.

GetHybridPart Method
Gets a document object for the hybrid part with the specified name.

Syntax
GetHybridPart(PartName as String) As IASDocument6

Parameters

Name Description
PartName The name of the hybrid part for which to get a document object.

Return Value
A Document object.

Confidential and Proprietary © 2021 70                                                           www.accruent.com


GetLog Method
Gets the workflow comment log for the current document object.

Syntax
GetLog() As String

Parameters
This method accepts no parameters.

Return Value
A single string containing the entire Comment property value.

Remarks
This method can be useful to append the workflow history of one document to another that is being
replaced or superceded.

Example
Sub DocProjectCopyEvent_AfterReleaseToMaster(Batch, MasterDoc,
ProjectCopyChanged)
MasterDoc.Log Document.GetLog()
MasterDoc.ApplyPropertyValues
End Sub

GetNavigationViewLevelPath Method
Gets the path of the current document object within a specified navigation view.

Syntax
Function GetNavigationViewLevelPath(ViewName)

Parameters

Name Description
ViewName Name of the view to get the path from.

Confidential and Proprietary © 2021 71                                                           www.accruent.com


Return Value
Array containing the names of each level of the path.

GetReferences Method
Gets the references of the specified type for the current document object.

Syntax
GetReferences(RefTypeName As String, [InComing As Boolean = False]) As
IASReferences

Parameters

Name Description
RefTypeName The name of the reference type to retrieve.
InComing If True, returns only incoming references. If False, returns only outgoing references.

Return Value
A collection of references as described in References Object.

HasHotspots method
Returns a boolean indicating whether automatic or manual hotspots exist on the document.

Syntax
HasHotspots(AS_HOTSPOTS_TYPE)

Parameters

Name Description
AS_ An enumeration that determines whether to check for manual or automatic hotspots.
HOTSPOTS_ You can use AS_HOTSPOTS_MANUAL or AS_HOTSPOTS_AUTOMATIC
TYPE

Confidential and Proprietary © 2021 72                                                           www.accruent.com


HybridMainDocument Method
Returns the main document object for the current hybrid part document.

Syntax
HybridMainDocument As IASDocument6

Return Value
The main document object for the current hybrid part document.

Remarks
Only returns an object if the current document is a part of a hybrid document. Otherwise, it returns
Nothing.

ImportHybridPart Method
Creates a new hybrid part for the current document and loads content from the specified file path.

Syntax
ImportHybridPart(FilePath as String) As IASDocument11

Parameters

Name Description
FilePath The path of a file from which to import document content for the new hybrid part.

Return Value
A Document object.

Remarks
This method is equivalent to the combination of the CreateHybridPart and LoadFromFile methods.
For events to occur for this method, the HybridEvents setting in the [ScriptEvents] section on the
Application Integration tab of Application Settings in Configurator must be set to Y (default).

Confidential and Proprietary © 2021 73                                                           www.accruent.com


LinkToMaster Method
Links the selected document to a specified master document from which it was not originally copied.

Syntax
LinkToMaster(MasterDocument As Object, [LockMaster As Boolean=False])

Parameters

Name Description
MasterDocument A document object to which to link the selected document.
LockMaster If True, locks the master document after the link has been made. Optional.

Remarks
Ideally, this method should not be used under the same conditions as the Link to Master command
described in the AccruentMeridian Enterprise User's Guide.

LoadFromFile Method
Loads content for the current document from the specified file.

Syntax
LoadFromFile(FileName as String)

Parameters

Name Description
FileName If specified, the file to load from the specified location outside the vault. If absent, the file is
loaded from the Local Workspace with its current name.

Return Value
The name of the file that was loaded.

Remarks
Use this method to load content for a newly created hybrid part.

Confidential and Proprietary © 2021 74                                                           www.accruent.com


LoadFromTemplate Method
Loads content for the current document from the specified document type template.

Syntax
LoadFromTemplate(TemplateName as String)

Parameters

Name Description
TemplateName If specified, the file is saved in the specified location outside the
vault. If absent, the file is saved in the Local Workspace with its
current name.

Remarks
Use this method to load content for a newly created hybrid part.

LockLWS Method
Locks the current document object in the user's local workspace.

Syntax
LockLWS()

Parameters
This method accepts no parameters.

Return Value
The path of the file that was locked.

LockMasterDocument Method
Locks the master document from which the current project copy was made.

Confidential and Proprietary © 2021 75                                                           www.accruent.com


Syntax
LockMasterDocument()

Parameters
This method accepts no parameters.

Log Method
Appends a line of text to the Comments property of the current document object.

Syntax
Log(Line As String)

Parameters

Name Description
Line A line of text to add to the document's comment log

Migrate Method
Migrates the current document object from an active document type workflow state to the specified
workflow definition state.

Syntax
Migrate(Workflow As String, [WorkFlowState], [Comments])

Parameters

Name Description
Workflow The name of the workflow definition to which to migrate the document.
WorkFlowState Optional workflow definition state name to which to migrate the document.
Comments Optional text to append to the document's comment log.

Confidential and Proprietary © 2021 76                                                           www.accruent.com


MoveTo Method
Moves the current document to the specified folder.

Syntax
MoveTo(TargetFolder As IASFolder3, [Options As Long = 0])

Parameters

Name Description
TargetFolder An object that represents the folder to which to move the current document object.
Options Optional long integer that represents one or more AS_MOVE_OPTIONS constants.

Remarks
If this method is called within the AfterExecuteTransition event, the text Copy of is prepended to the
filename if the document already resides in the target folder. This method does not support Field-Path
definition levels.
When this method is called, any property values set by code are reset to their original values.
If this method is used in event procedures such as DocGenericEvent_AfterNewDocument, an unhandled
exception Cannot delete a relation. The object is already being edited by another session can occur. This
can happen if the folder to which the document is being moved is locked, such as by another new
document wizard in use by another user at the same time. This is likely to happen if event procedures are
customized to provide automatic document storage together with the Meridian Advanced Project
Workflow Module so that it works similar to a Field-Path definition. To work around this problem, you can
configure the default location of document copies as described in the AccruentMeridian Enterprise
Configuration Guide.
For the wizard events to occur for this method, the MoveEvents setting in the [ScriptEvents] section on
the Application Integration tab of Application Settings in Configurator must be set to Y (default).
Note:
To use this method to move documents to folders that users are not granted Create Document privilege,
grant them the Create Document from Script privilege for the destination folder. The privilege may only
be granted for custom folder types , not normal folders.

ReassignManagers Method
Reassigns the workflow definition managers of the current document object.

Syntax
ReassignManagers(Managers, [Comments])

Confidential and Proprietary © 2021 77                                                           www.accruent.com


Parameters

Name Description
Managers The user names of the new workflow managers.
Comments Optional comments to add to the document's Comments property.

Remarks
For events to occur for this method, the CWFEvents setting in the [ScriptEvents] section on the
Application Integration tab of Application Settings in Configurator must be set to Y (default).

ReassignTodoPersons Method
Reassigns the workflow definition to-do persons of the current document object.

Syntax
ReassignTodoPersons(Persons, [Comments])

Parameters

Name Description
Persons The user names of the new to-do persons.
Comments Optional comments to add to the document's Comments property.

Remarks
For events to occur for this method, the CWFEvents setting in the [ScriptEvents] section on the
Application Integration tab of Application Settings in Configurator must be set to Y (default).

ReleaseChange Method
Releases the working copy or Quick Change of the current document object.

Syntax
ReleaseChange()

Confidential and Proprietary © 2021 78                                                           www.accruent.com


Parameters
This method accepts no parameters.

Remarks
For events to occur for this method, the QuickChangeEvents setting in the [ScriptEvents] section on the
Application Integration tab of Application Settings in Configurator must be set to Y. The default is N.

Reroute Method
Reroutes the current document object to a specified workflow definition state.

Syntax
Reroute(WorkFlowState, [Comments], [ToDoPersons])

Parameters

Name Description
WorkFlowState The name of the state to which to reroute the document.
Comments Optional comments to add to the document's Comments property.
ToDoPersons Optional user names of the new to-do persons.

Remarks
For events to occur for this method, the CWFEvents setting in the [ScriptEvents] section on the
Application Integration tab of Application Settings in Configurator must be set to Y (default).

ResetPropertyValues Method
Resets the properties of the current document object.

Syntax
ResetPropertyValues()

Parameters
This method accepts no parameters.

Confidential and Proprietary © 2021 79                                                           www.accruent.com


RevokeChange Method
Revokes the working copy or Quick Change of the current document object.

Syntax
RevokeChange()

Parameters
This method accepts no parameters.

Remarks
For events to occur for this method, the QuickChangeEvents setting in the [ScriptEvents] section on the
Application Integration tab of Application Settings in Configurator must be set to Y. The default is N.

RevokeWorkflow Method
Revokes the active workflow definition of the current document object.

Syntax
RevokeWorkflow()

Parameters
This method accepts no parameters.

Remarks
For events to occur for this method, the SDWFEvents setting in the [ScriptEvents] section on the
Application Integration tab of Application Settings in Configurator must be set to Y. The default is N.

SaveToFile Method
Saves the current document content to an external file or Local Workspace file.

Syntax
SaveToFile([FileName as String])

Confidential and Proprietary © 2021 80                                                           www.accruent.com


Parameters

Name Description
FileName If specified, the file is saved in the specified location outside the vault. If absent, the file is
saved in the Local Workspace with its current name.

Return Value
The path of the file that was saved.

Remarks
Use this method to temporarily save the content of a non-hybrid part document before creating a new
hybrid part and then loading the file created by this method as the new part's content.

SendToPortal Method
Sends the current document to the Meridian360 Portal project to which the document's parent folder is
linked.

Syntax
SendToPortal([Members as String])

Parameters

Name Description
Members Array of the Meridian360 Portal project members that are recipients of the document.

SetModified Method
Changes the internal Modified property of a document.

Syntax
SetModified(ModifiedDate As Date)

Confidential and Proprietary © 2021 81                                                           www.accruent.com


Parameters

Name Description
ModifiedDate The date to set for the Modified property.

Remarks
This method can be useful in DocProjectCopy_*ReleaseToMaster event procedures when a project copy is
released as a new master document but the document has no content, such as asset tags. Setting the
Modified property of a project copy causes Meridian to consider the document as changed and the
master document is replaced.

StartChange Method
Initiates a working copy or Quick Change of the current document object.

Syntax
StartChange()

Parameters
This method accepts no parameters.

Remarks
For events to occur for this method, the QuickChangeEvents setting in the [ScriptEvents] section on the
Application Integration tab of Application Settings in Configurator must be set to Y. The default is N.

StartWorkflow Method
Initiates a workflow definition of the current document object.

Syntax
StartWorkflow(Workflow As String, [Transition], [Comments],
[TodoPersons], [Managers])

Confidential and Proprietary © 2021 82                                                           www.accruent.com


Parameters

Name Description
Workflow The name of the workflow definition to initiate.
Transition Optional name of a transition to execute.
Comments Optional comments to add to the document's Comments property.
ToDoPersons Optional user names of the to-do persons.
Managers Optional user names of the workflow managers.

Remarks
For events to occur for this method, the CWFEvents setting in the [ScriptEvents] section on the
Application Integration tab of Application Settings in Configurator must be set to Y (default).

Subscribe Method
Registers the specified user to receive notifications of events for the current document.

Syntax
Subscribe(User As String, Notification As String)

Parameters

Name Description
User User (To-Do list) name or array of names.
Notification Internal name or array of internal names of event notification definitions to send to the
specified users.

Unsubscribe Method
Unregisters the specified user from receiving notifications of events for the current document.

Syntax
Unsubscribe(User As String, Notification As String)

Confidential and Proprietary © 2021 83                                                           www.accruent.com


Parameters

Name Description
User User (To-Do list) name or array of names.
Notification Internal name or array of internal names of event notification definitions to unregister for
the specified users.

UnlockLWS Method
Unlocks the current document object from the user's local workspace.

Syntax
UnlockLWS()

Parameters
This method accepts no parameters.

Return Value
The path of the file that was unlocked.

UnLockMasterDocument Method
Unlocks the master document from which the current project copy was made.

Syntax
UnLockMasterDocument()

Parameters
This method accepts no parameters.

UpdateRendition Method
Requests an external process to update the rendition content for the current document.

Confidential and Proprietary © 2021 84                                                           www.accruent.com


Syntax
Sub UpdateRendition()

Remarks
An interface for this method to specify the external process has not yet been implemented.

Confidential and Proprietary © 2021 85                                                           www.accruent.com


DocumentType Object
The DocumentType object represents a document type definition.

DocumentType Object Properties


The DocumentType object provides the following properties.

ConfigKeywords Property
Gets the keywords configured for a document type.

Syntax
ConfigKeywords As String

Remarks
Assign keywords to document types to make it convenient to test for them in more ways than just by
name. This can be useful for associating multiple document types together, for example, to authorize
access by users or groups. For information about setting keywords in document types, see the
AccruentMeridian Enterprise Configuration Guide.

Example
If InStr(document.DocumentType.ConfigKeywords, "MyKeyword",1) > 0 Then
...
End If

DisplayName Property
The Display Name property of the document type. Read-only.

Syntax
DisplayName As String

InternalName Property
The internal name of the document type.

Confidential and Proprietary © 2021 86                                                           www.accruent.com


Syntax
InternalName As String

Sequence Property
An object that represents the specified document type sequence.

Syntax
Sequence(Name) As IASSequence

Important!
Using the vault name as a sequence name can cause errors and possibly crash the Accruent EDM Server
service.

Remarks
For information about the Sequence object, see Sequence Object. For information about using sequences
in file names, see the AccruentMeridian Enterprise Configuration Guide.

Confidential and Proprietary © 2021 87                                                           www.accruent.com


ExportPackage Object
The ExportPackage object is a property of the ExportPackages object and represents the current export
package.

ExportPackage Object Properties


The ExportPackage object provides the following properties, some of which are read-only.

ContentIncluded Property
Gets or sets a value that indicates the types of document content contained in the current export package.

Syntax
ContentIncluded As Long

Return Values
One of the AS_EXPORTPACKAGE_CONTENTINCLUDED_VALUES constants that are available in the VBScript
editor Object Browser.

Remarks
The package must be in the Open status to set the value.

Description Property
Gets or sets the description of the current package.

Syntax
Description As String

Remarks
The package must be in the Open status to set the value.

Destination Property
Gets or sets name of the publishing job assigned to the current export package.

Confidential and Proprietary © 2021 88                                                           www.accruent.com


Syntax
Destination As String

Remarks
The package must be in the Open status to set the value.

ID Property
Returns the ID of the current object. The value is unique within the current vault. For the ID value that is
unique among all vaults, retrieve the GlobalID property value, if available. Read-only.

Syntax
ID As String

Name Property
Returns the name of the current object. Depending on the object type, this property returns the display
name of the object or it returns the internal name and may be read-only.

Syntax
Name As String

Remarks
If the current object is a Package, it must be in the Open status to set the value.
If the current object is a User, this property is the short name of the user as stored in the user's Meridian
account information and is read-only. This property can be used to specify the recipient's email address
and either an empty string or no value set in the Address property. If an email address is specified in Name,
it must be surrounded with carets (<>). When used with Microsoft Outlook, the Name property may
contain the user's full name or last name and Outlook will attempt to resolve the name to the email
address in the default address book. Meridian user names can be shown in different formats as specified by
the server registry setting UserNameFormat described in the Accruent Meridian Enterprise Administrator's
Guide.

PackageURL Property
Gets the URL of the Meridian Explorer page to show the current export package. Read-only.

Syntax
PackageURL As String

Confidential and Proprietary © 2021 89                                                           www.accruent.com


ProjectID Property
Gets the Meridian Portal project ID (GUID) of the current package. Only available after the Meridian
Enterprise project has been linked to a Meridian Portal project. Read only.

Syntax
ProjectID As Long

Remarks
The ID is stored in the Meridian Enterprise folder property ProjectFolder PropertySet.ProjectID. The ID can
be set by the SetProjectID method.

ProjectName Property
Gets the Meridian Enterprise project name of the current package. Read only.

Syntax
ProjectName As String

Recipient Property
Gets or sets the recipient of the current export package.

Syntax
Recipient As String

Remarks
The package must be in the Open status to set the value.

Status Property
Gets the status of the current export package. Read-only.

Syntax
Status As Long

Confidential and Proprietary © 2021 90                                                           www.accruent.com


Return Values
One of the AS_EXPORTPACKAGE_STATUS_VALUES constants that are available in the VBScript editor
Object Browser.

ExportPackage Object Methods


The ExportPackage object methods affect the current export package.

Abort Method
Aborts sending the current export package.

Syntax
Abort()

Remarks
The package must be in the Failed or Pending status.

AddDocument Method
Adds the specified document to the current export package.

Syntax
AddDocument(DocGlobalID As String)

Parameters

Name Description
DocGlobalID The GlobalID value of the document to add.

Remarks
Only supported for export packages in the Open status.

Confidential and Proprietary © 2021 91                                                           www.accruent.com


Close Method
Changes the status of the current export package to Closed.

Syntax
Close()

Remarks
The package must be in the Sent, Failed, or Open status.

GetDocuments Method
Gets the documents contained in the current package.

Syntax
GetDocuments() As Array

Return Value
Returns an array of GlobalID values for the documents.

Remarks
When the current package is an import package, returns an array only if the Status property of the package
is AS_IPS_Imported.

IsDocumentInPackage Method
Gets a value that indicates whether the specified document is contained in the current export package.

Syntax
IsDocumentInPackage(DocGlobalID As String) As Boolean

Parameters

Name Description
DocGlobalID The GlobalID value of the document to check.

Confidential and Proprietary © 2021 92                                                           www.accruent.com


Return Value
True if the export package contains the specified document, otherwise False.

IsDocumentOutdatedInPackage Method
Gets a value that indicates whether modification time of the specified document is later than the time when
it was exported to the package.

Syntax
IsDocumentOutdatedInPackage(DocGlobalID As String) As Boolean

Parameters

Name Description
DocGlobalID The GlobalID value of the document to check.

Return Value
True if the document in the export package is outdated, otherwise False.

RemoveDocument Method
Removes the specified document from the current export package.

Syntax
RemoveDocument(DocGlobalID As String)

Parameters

Name Description
DocGlobalID The GlobalID value of the document to remove.

Remarks
Only supported for export packages in the Open status.

Confidential and Proprietary © 2021 93                                                           www.accruent.com


Reopen Method
Changes the status of the current export package from the Closed state to the Open state.

Syntax
Reopen()

Remarks
The package must be in the Sent or Closed status.

Send Method
Sends the current package to the destination specified in the publishing job.

Syntax
Send()

Remarks
The package must be in the Open status.

SetProjectID Method
Sets the Meridian Portal project ID (GUID) of the current package.

Syntax
SetProjectID (ProjectID as String)

Remarks
The ID can be retrieved by the ProjectID property.

Update Method
Saves the properties of the current package.

Syntax
Update()

Confidential and Proprietary © 2021 94                                                           www.accruent.com


Remarks
Invoke this method after setting all of the package property values and before adding documents and
sending the package.

Confidential and Proprietary © 2021 95                                                           www.accruent.com


ExportPackages Object
The ExportPackages object exposes the export package functionality of the vault. The ExportPackages
object is available to the Vault object.

ExportPackages Object Methods


The ExportPackages object methods affect the collection of all ExportPackage objects related to the
current vault.

CreateNewPackage Method
Creates a new export package for documents from the current vault.

Syntax
CreateNewPackage(Name As String) As IASExportPackage

Parameters

Name Description
Name The name of the new export package

Return Value
An ExportPackage object.

FindDocumentPackages Method
Gets the export packages that contain the document with a given GlobalID value.

Syntax
FindDocumentPackages(DocGlobalID As String) As Array

Parameters

Name Description
DocGlobalID The GlobalID value of the document for which to find the related export packages.

Confidential and Proprietary © 2021 96                                                           www.accruent.com


Return Value
An array of ExportPackage objects.

FindPackage Method
Gets an export package with a given name.

Syntax
FindPackage(NameOrID As String) As IASExportPackage

Parameters

Name Description
NameOrID Name or ID of the export package to get.

Return Value
An ExportPackage object.

Confidential and Proprietary © 2021 97                                                           www.accruent.com


Folder Object
The Folder object represents the selected folder or the parent folder of the selected Document object and
is available for event procedures that apply to folders.
The Folder object has a large number of properties and methods. They have been split into two separate
topics: Folder Object Properties, and Folder Object Methods.

Confidential and Proprietary © 2021 98                                                           www.accruent.com


Folder Object Properties
The Folder object provides the following properties, most of which are read-only. To affect some read-only
properties requires user interaction or custom event procedures.
The AMProjectWorkflowPropertySet property set is assigned to a folder type when a workflow definition is
assigned to the folder type. If the workflow definition is unassigned later, the property set will remain
assigned to the folder type and cannot be removed. This is necessary to support vault history and is similar
to property sets assigned to document types. Also, if the folder type is assigned to multiple levels of a Field-
Path definition, the values returned to documents in the structure will be from the immediately previous
level. Because the value can be inconsistent, routed properties should only be used in vault customization
with great care.

AutoDocumentType Property
Gets or sets the name of the document type to apply to documents that are automatically created in the
current folder.

Syntax
AutoDocumentType As String

Remarks
The documents may be created because the folder is a shared workspace and the documents were created
in the linked folder that resides outside the vault. The documents are then imported into the vault when
the shared workspace is synchronized with the vault. For more information about shared workspaces, see
the AccruentMeridian Enterprise Configuration Guide.

Created Property
The date and time when the folder was created. Read-only.

Syntax
Created As Date

Confidential and Proprietary © 2021 99                                                           www.accruent.com


CreatedBy Property
An object that represents the user who created the folder. Read-only.

Syntax
CreatedBy As IASUser

HasDocuments Property
True if the folder or its sub folder contains documents. Read-only.

Syntax
HasDocuments As Boolean

ID Property
Returns the ID of the current object. The value is unique within the current vault. For the ID value that is
unique among all vaults, retrieve the GlobalID property value, if available. Read-only.

Syntax
ID As String

IsProject Property
True if the folder is associated with a project definition. Read-only.

Syntax
IsProject As Boolean

IsUniqueValue Property
True if the specified value for the specified folder property is unique within the current vault. Read-only.

Syntax
IsUniqueValue(PropertyName, Value) As Boolean

Confidential and Proprietary © 2021 100                                                           www.accruent.com


LinkedProjectID Property
ProjectFolderPropertySet.ProjectID value for current project folder. Read-only.

Syntax
LinkedProjectID As String

Name Property
Returns the name of the current object. Depending on the object type, this property returns the display
name of the object or it returns the internal name and may be read-only.

Syntax
Name As String

Remarks
If the current object is a Package, it must be in the Open status to set the value.
If the current object is a User, this property is the short name of the user as stored in the user's Meridian
account information and is read-only. This property can be used to specify the recipient's email address
and either an empty string or no value set in the Address property. If an email address is specified in Name,
it must be surrounded with carets (<>). When used with Microsoft Outlook, the Name property may
contain the user's full name or last name and Outlook will attempt to resolve the name to the email
address in the default address book. Meridian user names can be shown in different formats as specified by
the server registry setting UserNameFormat described in the Accruent Meridian Enterprise Administrator's
Guide.

ParentFolder Property
An object that represents the parent folder of the folder. Read-only.

Syntax
ParentFolder As IASFolder3

Confidential and Proprietary © 2021 101                                                           www.accruent.com


ParentProject Property
An object that represents the parent project folder of the current project object. Read-only.

Syntax
ParentProject As IASFolder3

Path Property
Relative path of the folder from the root of the vault. Read-only.

Syntax
Path As String

ProjectTypeDisplayName Property
The name of the project type as seen by users. Read-only.

Syntax
ProjectTypeDisplayName As String

ProjectTypeName Property
The internal name of the current project type object. Read-only.

Syntax
ProjectTypeName As String

Property Property
The value of the specified (String) folder property.

Syntax
Property(Name) As Variant

Confidential and Proprietary © 2021 102                                                           www.accruent.com


Roles Property
An object that represents the security roles that are applied to the current folder object.
For information about the Roles object, see Roles Object. For information about configuring security roles,
see the AccruentMeridian Enterprise Configuration Guide. For information about assigning security roles
to folders, see the AccruentMeridian Enterprise User's Guide.

Sequence Property
An object that represents the specified folder sequence.
Important!
Using the vault name as a sequence name can cause errors and possibly crash the Meridian EDM Server
service.
For information about the Sequence object, see Sequence Object. For information about using sequences
in file names, see the AccruentMeridian Enterprise Configuration Guide.

Syntax
Sequence(Name) As IASSequence

ShareID Property
A server ShareID to get a transaction object from another process. Read-only.

Syntax
ShareID As String

TypeDisplayName Property
The Display Name value of the folder type. Read-only. 

Syntax
TypeDisplayName As String

Confidential and Proprietary © 2021 103                                                           www.accruent.com


TypeName Property
The Name value of the folder type. Read-only.

Syntax
TypeName As String

WorkflowManagers Property
The names of the managers of the current workflow object. This property is a string when there is a single
user and a string array when multiple users are assigned. You can test with the function IsArray
(Folder.WorkflowManagers) whether there are one or multiple users. Read-only.

Syntax
WorkflowManagers As String

WorkFlowState Property
Long integer that represents one or more AS_WF_STATE constants. Read-only.

Syntax
WorkFlowState As AS_WF_STATE

WorkflowStatus Property
A long integer that represents one or more AS_PWF_STATUS constants. Read-only.

Syntax
WorkflowStatus As AS_PWF_STATUS

Confidential and Proprietary © 2021 104                                                           www.accruent.com


Folder Object Methods
The Folder object methods affect the current folder object.

ApplyPropertyValues Method
Saves the current property values to the current folder object.

Syntax
ApplyPropertyValues()

Parameters
This method accepts no parameters.

ChangeFolderType Method
Changes the folder type of the current folder object.

Syntax
ChangeFolderType(NewFoldertype As String)

Parameters

Name Description
NewFolderType The name of the new folder type.

Remarks
For events to occur for this method, the ChangeFolderTypeEvents setting in the [ScriptEvents] section on
the Application Integration tab of Application Settings in Configurator must be set to Y (default).

Confidential and Proprietary © 2021 105                                                           www.accruent.com


ConvertToProject Method
Converts the current folder object to a specified project folder.

Syntax
ConvertToProject (ProjectDefinitionName As String)

Parameters

Name Description
ProjectDefinitionName The name of the project definition.

CopyProperties Method
Copies all of the property values of the current folder to a specified folder except for an optional array of
property names.

Syntax
CopyProperties(PropertySetName As String, TargetFolder As Folder,
[ExcludeProperties] As String)

Parameters

Name Description
PropertySetName Name of the property set to copy.
TargetFolder Folder object to which to copy the properties.
ExcludeProperties Optional one dimension array of a property names to exclude from copying.

Remarks
The following example copies all properties in the property set MyPropSet to the specified folder object
except for the properties named Prop1 and Prop2.
Folder.CopyProperties "MyPropSet", Folder, Array("Prop1", "Prop2")

Confidential and Proprietary © 2021 106                                                           www.accruent.com


Delete Method
Deletes the folder.

Syntax
Delete()

ExecTransition Method
Executes the specified project workflow transition for the current folder object.

Syntax
ExecTransition(WorkflowTransition As IASWorkflowTransition, [Comments
As String], [Managers As String])

Parameters

Name Description
WorkflowTransition An object that represents the project workflow transition to run.
Comments Optional comments to append to the comment log.
Managers Optional user names to assign as the new workflow managers.

Remarks
For events to occur for this method, the PrjWFEvents setting in the [ScriptEvents] section on the
Application Integration tab of Application Settings in Configurator must be set to Y(default).

GetExpectedTransitionResult Method
Returns the expected result of executing the specified project workflow transition for the current folder
object.

Syntax
GetExpectedTransitionResult(Transition As IASWorkflowTransition) As
AS_WORKFLOW_TRANS_RES

Confidential and Proprietary © 2021 107                                                           www.accruent.com


Parameters

Name Description
Transition An object that represents the project workflow transition to run.

Remarks
Returns a long integer that is equivalent to one or more of the AS_WORKFLOW_TRANS_RES constants that
represents the expected results. Use this method to determine the current consensus status of parallel
workflows.

GetSubFolder Method
Returns a folder object that represents a subfolder of the current folder object.

Syntax
GetSubFolder(Name As String, [TypeName As String], [Options As Long =
0]) As IASFolder6

Parameters

Name Description
Name The name of the subfolder to return.
TypeName Folder type of the subfolder to return. To return a standard folder, specify an empty string.
Options Optional long integer that represents one or more AS_NEWFOLDER_OPTIONS constants.

Return Value
A Folder object.

Remarks
Pass the AS_NFO_CREATE_IFNOTEXIST constant to this method to create a new subfolder equivalent to
the NewFolder method.
For the wizard events to occur for this method, the NewWizardEvents setting in the [ScriptEvents] section
on the Application Integration tab of Application Settings in Configurator must be set to Y. The default is
N.

Confidential and Proprietary © 2021 108                                                           www.accruent.com


GetSubFolderNames Method
Gets the names of the subfolders of the current folder object.

Syntax
GetSubFolderNames([FolderType As String])

Parameters

Name Description
FolderType Optional folder type of the subfolders to return.

Return Value
An array of subfolder names.

GetUsersWithRole Method
Gets all users with a specified security role for the current folder.

Syntax
GetUsersWithRole (Role As String)

Parameters

Name Description
Role The name of the role for which to get users.

Return Value
An array of User objects.

Confidential and Proprietary © 2021 109                                                           www.accruent.com


Interlock Method
Returns the result of evaluating the specified interlock.

Syntax
Interlock(InterlockName As String, [InterlockLocationRLOCK_LOCATION =
AS_WFIL_PARENT_PROJECT], [DefaultResult As Boolean = False]) As
Boolean

Parameters

Name Description
InterlockName The name of the interlock to evaluate.
InterlockLocation The location of the interlock to evaluate expressed as one of the AS_WFINTERLOCK_
LOCATION constants.
DefaultResult A value to return by default if the interlock is not satisfied.

LinkToPortal Method
Links the Meridian project to a Meridian Portal project

Syntax
LinkToPortal()

Parameters
This method accepts no parameters.

MoveTo Method
Moves the current folder to the specified folder.

Syntax
MoveTo(TargetFolder As IASFolder3, [Options As Long = 0], [Comments])

Confidential and Proprietary © 2021 110                                                           www.accruent.com


Parameters

Name Description
TargetFolder An object that represents the folder to which to move the current document object.
Options An optional long integer that represents the move options. One or more of the AS_
MOVE_OPTIONS constants.

NewFolder Method
Creates a new subfolder of the current folder object.

Syntax
NewFolder(FolderName As String, TypeName As String, [Options As Long =
0]) As IASFolder

Parameters

Name Description
FolderName The name of the new folder.
TypeName Folder type name for the new folder. To create a standard folder, specify an empty string.
Options Optional long integer that represents one or more AS_NEWFOLDER_OPTIONS constants.

Return Value
A Folder object.

Remarks
The AS_NFO_CREATE_IFNOTEXIST constant can also be passed to the GetSubFolder method to create a
new subfolder.
The AS_NFO_SHOWWIZARD is not supported in PowerWeb.

Confidential and Proprietary © 2021 111                                                           www.accruent.com


ReassignWorkflowManagers Method
Reassigns the workflow definition managers of the current folder object.

Syntax
ReassignWorkflowManagers(Managers, [Comments])

Parameters

Name Description
Managers The user names of the new workflow managers.
Comments Optional comments to add to the document's Comments property.

Remarks
For events to occur for this method, the PrjWFEvents setting in the [ScriptEvents] section on the
Application Integration tab of Application Settings in Configurator must be set to Y (default).

Reroute Method
Reroutes the current folder object to a specified project workflow state.

Syntax
Reroute(WorkFlowState, [Comments], [Managers])

Parameters

Name Description
WorkFlowState The name of the state to which to reroute the folder.
Comments Optional comments to add to the folder's Comments property.
Managers Optional user names of the new workflow managers.

Confidential and Proprietary © 2021 112                                                           www.accruent.com


ResetPropertyValues Method
Resets the properties of the current folder object.

Syntax
ResetPropertyValues()

Parameters
This method accepts no parameters.

UnlinkFromPortal Method
Removes the link from the Meridian project to Meridian Portal project.

Syntax
UnlinkFromPortal()

Parameters
This method accepts no parameters.

Confidential and Proprietary © 2021 113                                                           www.accruent.com


ImportPackage Object
The ImportPackage object represents the current import package.

ImportPackage Object Properties


The ImportPackage object provides the following properties, all of which are read-only. They are described
below.

Description Property
Gets or sets the description of the current package.

Syntax
Description As String

Remarks
The package must be in the Open status to set the value.

ID Property
Returns the ID of the current object. The value is unique within the current vault. For the ID value that is
unique among all vaults, retrieve the GlobalID property value, if available. Read-only.

Syntax
ID As String

Name Property
Returns the name of the current object. Depending on the object type, this property returns the display
name of the object or it returns the internal name and may be read-only.

Syntax
Name As String

Remarks
If the current object is a Package, it must be in the Open status to set the value.

Confidential and Proprietary © 2021 114                                                           www.accruent.com


If the current object is a User, this property is the short name of the user as stored in the user's Meridian
account information and is read-only. This property can be used to specify the recipient's email address
and either an empty string or no value set in the Address property. If an email address is specified in Name,
it must be surrounded with carets (<>). When used with Microsoft Outlook, the Name property may
contain the user's full name or last name and Outlook will attempt to resolve the name to the email
address in the default address book. Meridian user names can be shown in different formats as specified by
the server registry setting UserNameFormat described in the Accruent Meridian Enterprise Administrator's
Guide.

ImportProfile Property
Gets the ImportProfile object that is assigned to the current ImportPackage object.

Syntax
ImportProfile As Object

ImportPackage Object Methods


The ImportPackage object methods affect the current import package. They are described below.

GetDocuments Method
Gets the documents contained in the current package.

Syntax
GetDocuments() As Array

Return Value
Returns an array of GlobalID values for the documents.

Remarks
When the current package is an import package, returns an array only if the Status property of the package
is AS_IPS_Imported.

Confidential and Proprietary © 2021 115                                                           www.accruent.com


ImportProfile Object
The ImportProfile object represents an existing package import profile that is defined in Meridian
Enterprise Server.

ImportProfile Object Properties


The ImportProfile object provides the following properties, all of which are read-only. They are described
below.

Destination Property
Gets or sets the name of the destination vault that is assigned to the current ImportProfile.

Syntax
Destination As String

ID Property
Returns the ID of the current object. The value is unique within the current vault. For the ID value that is
unique among all vaults, retrieve the GlobalID property value, if available. Read-only.

Syntax
ID As String

Name Property
Returns the name of the current object. Depending on the object type, this property returns the display
name of the object or it returns the internal name and may be read-only.

Syntax
Name As String

Remarks
If the current object is a Package, it must be in the Open status to set the value.
If the current object is a User, this property is the short name of the user as stored in the user's Meridian
account information and is read-only. This property can be used to specify the recipient's email address
and either an empty string or no value set in the Address property. If an email address is specified in Name,
it must be surrounded with carets (<>). When used with Microsoft Outlook, the Name property may

Confidential and Proprietary © 2021 116                                                           www.accruent.com


contain the user's full name or last name and Outlook will attempt to resolve the name to the email
address in the default address book. Meridian user names can be shown in different formats as specified by
the server registry setting UserNameFormat described in the Accruent Meridian Enterprise Administrator's
Guide.

Confidential and Proprietary © 2021 117                                                           www.accruent.com


MailMessage Object
The MailMessage object represents an email message. The MailMessage object is available to the
Briefcase object.

MailMessage Object Properties


The MailMessage object provides the following properties, most of which are read-only. To affect some
read-only properties requires user interaction or custom event procedures.

Attachments Property
A collection of attachments for the current message. Read-only.

Syntax
Attachments As IASAttachments

NoteText Property
The body text of the current message.

Syntax
NoteText As String

Originator Property
An object that represents the originator of the current message. Read-only.

Syntax
Originator As IASMailRecipient

Recipients Property
A collection of recipients of the current message. Read-only.

Syntax
Recipients As IASMailRecipients

Confidential and Proprietary © 2021 118                                                           www.accruent.com


Subject Property
The subject text of the current message.

Syntax
Subject As String

MailMessage Object Methods


The MailMessage object methods affect the current MailMessage object. They are described below.

Clean Method
Removes all properties from the current MailMessage object.

Syntax
Clean()

Parameters
This method accepts no parameters.

Send Method
Sends the current MailMessage object.

Syntax
Send(Flags As Long)

Parameters

Name Description
Flags A combination of one or more AS_MAPIMSG_SEND_FLAGS constants. Read-only.

Confidential and Proprietary © 2021 119                                                           www.accruent.com


MailRecipient Object
The MailRecipient object represents a recipients of an email message. The MailRecipient object is available
to the current MailRecipients collection.

MailRecipient Object Properties


The MailRecipient object provides the following properties.

Address Property
The email address of the recipient.

Syntax
Address As String

Remarks
The Name property should be used to specify the recipient's email address and either an empty string or
no value set in the Address property. If an email address is specified in Name, it must be surrounded with
carets (<>). When used with Microsoft Outlook, the Name property may contain the user's full name or last
name and Outlook will attempt to resolve the name to the email address in the default address book.

Name Property
Returns the name of the current object. Depending on the object type, this property returns the display
name of the object or it returns the internal name and may be read-only.

Syntax
Name As String

Remarks
If the current object is a Package, it must be in the Open status to set the value.
If the current object is a User, this property is the short name of the user as stored in the user's Meridian
account information and is read-only. This property can be used to specify the recipient's email address
and either an empty string or no value set in the Address property. If an email address is specified in Name,
it must be surrounded with carets (<>). When used with Microsoft Outlook, the Name property may
contain the user's full name or last name and Outlook will attempt to resolve the name to the email
address in the default address book. Meridian user names can be shown in different formats as specified by
the server registry setting UserNameFormat described in the Accruent Meridian Enterprise Administrator's
Guide.

Confidential and Proprietary © 2021 120                                                           www.accruent.com


Type Property
The type of recipient as one of the AS_MAPIMSG_RECIP_TYPE constants.

Syntax
Type As AS_MAPIMSG_RECIP_TYPE

Confidential and Proprietary © 2021 121                                                           www.accruent.com


MailRecipients Object
The MailRecipients object represents a collection of recipients of an email message. The MailRecipients
object is available to the current Briefcase object.

MailRecipients Object Properties


The MailRecipients object provides the following properties, all of which are read-only. To affect some
read-only properties requires user interaction or custom event procedures.

Count Property
The total number of message recipients. Read-only.

Syntax
Count As Long

Recipient Property
An object that represents the individual recipient specified by Index.

Syntax
Recipient(Index) As IASMailRecipient

MailRecipients Object Methods


The MailRecipients object methods affect the current MailRecipients object. They are described below.

Add Method
Adds a recipient to the current MailRecipients collection.

Syntax
Add(Address As String, [Type As AS_MAPIMSG_RECIP_TYPE = AS_MMRT_TO],
[Name As String]) As IASMailRecipient

Confidential and Proprietary © 2021 122                                                           www.accruent.com


Parameters

Name Description
Address The email address of the recipient to add.
Type The type of recipient as one of the AS_MAPIMSG_RECIP_TYPE constants.
Name The name of the recipient to add.

Return Value
A MailRecipient object.

Remarks
The Name parameter should be used to specify the recipient's email address and an empty string passed to
the Address parameter. If an email address is specified in Name, it must be surrounded with carets (<>).
When used with Microsoft Outlook, Name parameter may contain the user's full name or last name and
Outlook will attempt to resolve the name to the email address in the default address book.

Examples
oMessage.Recipients.Add “” ,AS_MMRT_TO, “<” + Document.EmailAddress +
“>”
oMessage.Recipients.Add “” ,AS_MMRT_TO, “User Full Name” + “<” +
Document.EmailAddress + “>”
oMessage.Recipients.Add “” ,AS_MMRT_TO, “User Last Name”

Remove Method
Removes a recipient from the current MailRecipients object.

Syntax
Remove(Index)

Parameters

Name Description
Index The recipient in the MailRecipients collection specified by Index. Read-only.

Confidential and Proprietary © 2021 123                                                           www.accruent.com


RemoveAll Method
Removes all recipients from the current MailRecipients collection.

Syntax
RemoveAll()

Parameters
This method accepts no parameters.

Confidential and Proprietary © 2021 124                                                           www.accruent.com


MasterDocument Object
A Document object that represents the master document from which the current project copy document
was copied. The methods of the MasterDocument object are described below.

TransferToNext Method
Activates the next project copy in the waiting list of a master document. If the concurrent engineering rule
property is set to AS_CER_SERIAL_WITH_RELEASE, the property Waiting PC Priority is set
to 0 for the activated project copy.

Syntax
TransferToNext

Example
In this example, the vault is configured to use a property called AutoTransfer, which is set by a user on
the project folder. This is used to determine whether to execute the TransferToNext method.

Sub DocProjectCopyEvent_AfterReleaseToMaster(Batch, MasterDoc,


ProjectCopyChanged)
MasterDoc.ReleasedBy = Vault.User 
    MasterDoc.ReleasedAt = Year (Today) & "-" & Right ("0" & Month
(Today), 2) & "-" & Right ("0" & Day (Today), 2)
    MasterDoc.ReleasedFromProject = Document.ProjectName 
    MasterDoc.ProjectName = ""
    MasterDoc.ApplyPropertyValues

If Document.ParentProject.Project_AutoTransfer Then
MasterDoc.TransferToNext
End If
End Sub

Confidential and Proprietary © 2021 125                                                           www.accruent.com


MeridianQueue Object
The Publisher queue can be managed using the MeridianQueue object methods that are described below.

MeridianQueue Object Methods


The MeridianQueue object provides the methods that are described below.

BeginBatch Method
Begins collection of a batch of documents to register in the Publisher queue.

Syntax
Function BeginBatch (vaultId, commitSize)

Parameters

Name Description
vaultId A string that uniquely identifies the vault in which the document resides. Specify Nothing
or an empty string to work in the same vault where the VBScript runs. The vault identifier
has the syntax \\server\vault, where server is the name of the server computer and vault
is the internal name of the vault or datastore. The vault identifier may consist of only a
vault name, in which case the vault's default server, if set, will be assumed.
commitSize The number of documents to send to the server as a single transaction. The default is 0, all
documents in the batch are sent as one transaction.

Remarks
This method must be called in the _Initialize event procedure of a custom command, similar to the
following examples. If this is not done, then the RegisterDocument method registers documents in the
queue individually.
If any document is registered more than once, the Publisher configuration options described in the
AccruentMeridian Enterprise Administrator's Guide will determine the disposition of the batch.

Example
The following examples demonstrate how to do batch publishing either in a server-side process (better
performance and recommended) or a client-side process (if a client context is required).
Note:
The server-side example relies on the account under which the EDM Server service is running to have
access to the Meridian Enterprise Server web service.

Confidential and Proprietary © 2021 126                                                           www.accruent.com


Sub Publish_Batch_Execute(Batch)
AddToBatch Batch, Document
End Sub

Sub Publish_Batch_Initialize(Batch)
BeginBatch(Batch)
End Sub

Sub Publish_Batch_Terminate(Batch)
CommitBatch(Batch)
If Err.Number = 0 Then
WinMsgBox ("Documents have been registered for publishing")
End If
If Err.Number <> 0 Then
WinMsgBox Err.Description
Err.Clear
End If

End Sub

Public Sub BeginBatch(Batch)


Dim QueueObject
' Server side batch. For client side batch, pass False instead
Set QueueObject = AMCreateObject("BCPublisher.MeridianQueue", True)
Batch.Argument("PublisherBatch") = QueueObject
QueueObject.BeginBatch
End Sub

Public Sub CommitBatch(Batch)


On Error Resume Next
Dim QueueObject
Set QueueObject = Batch.Argument("PublisherBatch")
Batch.Argument("PublisherBatch") = Nothing
If Not (QueueObject Is Nothing) Then
QueueObject.CommitBatch
QueueObject.Dispose()
End If

If Err.Number <> 0 Then


Err.Raise Err.Number, Err.Source, _
"Failed to publish batch of documents: " + Err.Description
End If
End Sub

Public Sub AddToBatch(Batch, Document)


Dim QueueObject
Set QueueObject = Batch.Argument("PublisherBatch")
If Not (QueueObject Is Nothing) Then
Call QueueObject.RegisterDocument("", "1B4423", Document.ID, , , ,

Confidential and Proprietary © 2021 127                                                           www.accruent.com


, ,"")
End If
End Sub

CommitBatch Method
Commits as one batch all documents that have been registered in the Publisher queue since the calling of
the BeginBatch method.

Syntax
Function CommitBatch (vaultId)

Parameters

Name Description
vaultId A string that uniquely identifies the vault in which the document resides. Specify Nothing or
an empty string to work in the same vault where the VBScript runs. The vault identifier has the
syntax \\server\vault, where server is the name of the server computer and vault is the
internal name of the vault or datastore. The vault identifier may consist of only a vault name,
in which case the vault's default server, if set, will be assumed.

Remarks
This method must be called in the _Terminate event procedure of a custom command, similar to the
example shown in BeginBatch method. If this is not done, then the RegisterDocument method registers
documents in the queue individually.

RegisterDocument Method
Registers a Meridian Enterprise document in the Publisher queue.

Syntax
Function RegisterDocument(vaultId, jobId, documentId, _
revisionId, publishOptions, renderOptions, _
userName, preventDuplicate,
feedbackProperty,
customColumns)

Confidential and Proprietary © 2021 128                                                           www.accruent.com


Parameters

Name Description
vaultId A string that uniquely identifies the vault in which the document resides. Specify
Nothing or an empty string to work in the same vault where the VBScript operates.
The vault identifier has the syntax \\server\vault, where server is the name of the
server computer and vault is the internal name of the vault or datastore. The vault
identifier may consist of only a vault name, in which case the vault's default server, if
set, will be assumed.
jobId A string that uniquely identifies the publishing job name. If the job has multiple
destination systems configured and the document should be published to only one
of the systems, this string must specify the destination system display name. Use
the syntax jobId}systemDisplayName (for example, MyJob}MySystem). If the
document should be published to all of the destination systems, the system name
should be omitted.
documentId A string that uniquely identifies the document to publish.
Note:
This parameter accepts either a document ID, path, or Global ID value. However,
because the document's Global ID and path can change, we do not recommend
using values other than the document ID except under the direction of Accruent
Technical Support.
revisionId A string that uniquely identifies the revision of the document. The default is
Nothing.
publishOptions A string that specifies the options for the system links. The default is Nothing. For
information about the options that can be specified, see Publishing And Rendering
Options.
renderOptions A string that specifies the options for the rendering modules. The default is Nothing.
For information about the options that can be specified, see Publishing And
Rendering Options.
userName The name of the user who initiated the task. The Accruent user account must exist
in the Meridian Enterprise Server account database as described in the
AccruentMeridian Enterprise Server Administrator's Guide. If this parameter is
Nothing or an empty string, the name of the current user is used.
preventDuplicate A Boolean value indicating whether to check for duplicate items before adding a new
one. If any duplicates are found, the item will not be created. If Nothing, then the
option set for the publishing job is used.
feedbackProperty The name of the property where to store the result of the registration.
customColumns A 2D array of values (<columnName>, <columnValue>) that represent custom
columns in the Publisher Queue database.

Confidential and Proprietary © 2021 129                                                           www.accruent.com


Return Value
An integer value that uniquely identifies the registered document in the queue.

Remarks
Before calling a RegisterDocument from VBScript, you should create it with the AMCreateObject function
and specify the ProgId of the object as described in AMCreateObject Function. To explicitly delete and
release the object, call the Dispose method.
Instantiating a MeridianQueue object to publish documents can take longer than publishing the same
document with the PowerUser extension.

RevokeBatch Method
Revokes all documents that have been registered in the Publisher queue since the calling of the BeginBatch
method.

Syntax
Function RevokeBatch (vaultId)

Parameters

Name Description
vaultId A string that uniquely identifies the vault in which the document resides. Specify Nothing or
an empty string to work in the same vault where the VBScript runs. The vault identifier has the
syntax \\server\vault, where server is the name of the server computer and vault is the
internal name of the vault or datastore. The vault identifier may consist of only a vault name,
in which case the vault's default server, if set, will be assumed.

Remarks
This method must be called in the _Terminate event procedure of a custom command, similar to the
example shown in BeginBatch method. If this is not done, then the RegisterDocument method revokes
documents in the queue individually.

Confidential and Proprietary © 2021 130                                                           www.accruent.com


MeridianTask Object
The Meridian Enterprise Task Server can be used to register documents for publication with the
MeridianTask object properties that are described below.

MeridianTask Object Properties


The MeridianTask object provides the properties that are described below.
Note:
All unknown property assignments passed to the BCPublisher.MeridianTask object are considered as
custom column names and values.

DocumentID Property
A value that uniquely identifies the document to publish. If Nothing (default) or an empty string, then the
selected document is used.

Syntax
DocumentID As String

FeedbackProperty Property
The name of the property where to store the result of the document registration. The default is Nothing.

Syntax
FeedbackProperty As String

JobCode Property
A value that uniquely identifies the publishing job.

Syntax
JobCode As String

Remarks
If the job has multiple destination systems configured and the document should be published to only one
of the systems, this string must specify the destination system display name. Use the syntax

Confidential and Proprietary © 2021 131                                                           www.accruent.com


jobId>systemDisplayName (for example, MyJob>MySystem). If the document should be published to all of
the destination systems, the system name should be omitted.

PreventDuplicate Property
A value indicating whether to check for duplicate items before to adding a new one. If any duplicates are
found, the item will not be created. If Nothing (default), then the option set for the publishing job is used.

Syntax
PreventDuplicate As Boolean

PublishOptions Property
The publishing options for the current system links. Each system link defines the options that it supports.
For information about the publishing options supported by a specific system link, see the system link
description in the AccruentMeridian Enterprise Server Administrator's Guide. The options can be specified
in the source system client application, if supported by the link, or they can be specified in VBScript event
handlers. The default is Nothing.

Syntax
PublishOptions As String

RenderOptions Property
The options for the rendering modules. The default is Nothing.

Syntax
RenderOptions As String

RevisionID Property
A value that uniquely identifies the revision of the document. The default is Nothing.

Syntax
RevisionID As String

Confidential and Proprietary © 2021 132                                                           www.accruent.com


UserName Property
The name of the user who initiated the task. If Nothing (default) or an empty string, the name of the Task
Server service account is used.

Syntax
UserName As String

Confidential and Proprietary © 2021 133                                                           www.accruent.com


NewMailMessage Object
The NewMailMessage object allows the sending of email messages using the MAPI interface of the user's
registered email application. The NewMailMessage object supports full addressing and attachment
capabilities. This functionality is the same as the Send to Mail Recipient command in the Meridian client.

NewMailMessage Object Properties


The NewMailMessage object provides the following properties.

Attachments Property
A collection of attachments for the current message. Read-only.

Syntax
Attachments As IASMailAttachments

NoteText Property
The body text of the current message.

Syntax
NoteText As String

Originator Property
An object that represents the originator of the message.

Syntax
Originator As IASMailRecipient

Recipients Property
A collection of recipients of the current message.

Syntax
Recipients As IASMailRecipients

Confidential and Proprietary © 2021 134                                                           www.accruent.com


Subject Property
The subject text of the current message.

Syntax
Subject As String

NewMailMessage Object Methods


The NewMailMessage object provides the methods described below.

Clean Method
Clears all NewMailMessage object properties.

Syntax
Clean()

Parameters
This method accepts no parameters.

Send Method
Sends the current NewMailMessage object.

Syntax
Send(Flags As Long)

Parameters

Name Description
Flags A combination of one or more AS_MAPIMSG_SEND_FLAGS constants. Read-only.

Confidential and Proprietary © 2021 135                                                           www.accruent.com


ProjectCopy Object
The ProjectCopy object represents a project copy document of the current Document object. The
properties of the ProjectCopy object are described below.

ProjectCopy Object Properties


The ProjectCopy object provides the following properties.

IsActive Property
True if the project copy is active. Read-only.

Syntax
IsActive As Boolean

MasterLocked Property
True if the corresponding master document is locked. Read-only.

Syntax
MasterLocked As AS_PCLOCK

HasConcurrentPCs Property
True if the current Document object has multiple concurrent project copies. Read-only.

Syntax
HasConcurrentPCs As Boolean

Confidential and Proprietary © 2021 136                                                           www.accruent.com


ProjectCopy Object Methods
The ProjectCopy object provides the following methods.

UnlinkFromMaster Method
Removes the reference between a project copy and its master document and optionally unlocks the
master document if it was locked by the project copy that was detached.

Syntax
UnlinkFromMaster([UnlockMaster As Boolean = True])

Parameters

Name Description
UnlockMaster If True, unlocks the master document after the reference has been deleted. Optional.

RequireMerge Method
Reverses the effects of the Confirm Merged with Master command and reactivates the project copy.

Syntax
Function RequireMerge()

Parameters
This method accepts no parameters.

UndoMakeObsolete Method
Reverses the effects of the Confirm Superseded by Master command and reactivates the project copy.

Syntax
Function UndoMakeObsolete()

Parameters
This method accepts no parameters.

Confidential and Proprietary © 2021 137                                                           www.accruent.com


Query Object
The Query object represents a lookup list query to an external database. The Query object is available to
the Vault object.

Query Object Properties


The Query object provides the following properties, all of which are read-only. To affect some read-only
properties requires user interaction or custom event procedures.

DBConnection Property
An ADO connection object. Read-only.

Syntax
DBConnection As Object

DisplayName Property
The display name of the query as seen by users. Read-only.

Syntax
DisplayName As String

Name Property
Returns the name of the current object. Depending on the object type, this property returns the display
name of the object or it returns the internal name and may be read-only.

Syntax
Name As String

Remarks
If the current object is a Package, it must be in the Open status to set the value.
If the current object is a User, this property is the short name of the user as stored in the user's Meridian
account information and is read-only. This property can be used to specify the recipient's email address
and either an empty string or no value set in the Address property. If an email address is specified in Name,
it must be surrounded with carets (<>). When used with Microsoft Outlook, the Name property may
contain the user's full name or last name and Outlook will attempt to resolve the name to the email

Confidential and Proprietary © 2021 138                                                           www.accruent.com


address in the default address book. Meridian user names can be shown in different formats as specified by
the server registry setting UserNameFormat described in the Accruent Meridian Enterprise Administrator's
Guide.

Type Property
The type of the query as one of the AS_TQTYPE constants. Read-only.

Syntax
Type As AS_TQTYPE

Query Object Methods


The Query object methods affect the current Query object. They are described below.

GetValues Method
The GetValues method of the Query object is the same as the GetValues method of the Table object
except that it operates on a Query object.

GetValuesEx Method
The GetValuesEx method of the Query object is the same as the GetValuesEx method of the Table object
except that it operates on a Query object.

Confidential and Proprietary © 2021 139                                                           www.accruent.com


References Object
The References object represents the collection of Meridian references of a document. The References
object is available to the current Document object.
Note:
The References object is accessed by the Document.GetReferences method.

References Object Properties


The References object provides the following properties, all of which are read-only. To affect some read-
only properties requires user interaction or custom event procedures.

Count Property
The total number of references of the current Document object. Read-only.

Syntax
Count As Long

Exist Property
Returns True if the document specified by DocID is referenced by the current Documentobject.

Syntax
Exist(DocID) As Boolean

Target Property
Gets the referenced document specified by the collection index or DocID in Item. Read-only.

Syntax
Target(Item) As IASDocument5

Confidential and Proprietary © 2021 140                                                           www.accruent.com


References Object Methods
The References object methods affect the current Document object.

Add Method
Adds a reference by index or DocID to the current Document object.

Syntax
Add(DocID As String, [RefDisplayName As String])

Parameters

Name Description
DocID The DocID value of the document to reference.
RefDisplayName The name to display for the reference as seen by users.

Remarks
For events to occur for this method, the DocRefEvents setting in the [ScriptEvents] section on the
Application Integration tab of Application Settings in Configurator must be set to Y (default).

Delete Method
Deletes a reference from the current Document object by References index number or DocID.

Syntax
Delete(Item)

Parameters

Name Description
Item The References index or DocID value of the reference to delete.

Remarks
For events to occur for this method, the DocRefEvents setting in the [ScriptEvents] section on the
Application Integration tab of Application Settings in Configurator must be set to Y (default).

Confidential and Proprietary © 2021 141                                                           www.accruent.com


Refresh Method
Refreshes the current References collection.

Syntax
Refresh

Parameters
This method accepts no parameters.

Confidential and Proprietary © 2021 142                                                           www.accruent.com


Report Object
Use the Report object in configuration expressions to define a report template.

Report Object Properties


The Report object provides the following properties, all of which are read-only.

BriefCase Property
An object that represents a briefcase. If the parent object is a document, this is the briefcase to which the
document is locked. If the parent object is a report (transmittal sheet), this is the briefcase that contains
the report. Read-only.

Syntax
BriefCase As IASBriefCase

DisplayName Property
The name of the briefcase as seen by users. Read-only.

Syntax
DisplayName As String

DocumentCount Property
The number of documents contained in the report. Read-only.

Syntax
DocumentCount As Long

FileName Property
The file name (Display Name property) of the document or briefcase.

Syntax
FileName As String

Confidential and Proprietary © 2021 143                                                           www.accruent.com


Remarks
For events to occur when setting this property for a document, the RenameEvents setting in the
[ScriptEvents] section on the Application Integration tab of Application Settings in Configurator must be
set to Y. The default is N.

Format Property
The name of the template used by the report. Read-only.

Syntax
Format As String

QuoteChar Property
The text delimiter character used by the report. Read-only.

Syntax
QuoteChar As String

SepChar Property
The field separator character used by the report. Read-only.

Syntax
SepChar As String

VaultName Property
The name of the vault in which this report resides. Read-only.

Syntax
VaultName As String

Confidential and Proprietary © 2021 144                                                           www.accruent.com


Roles Object
The Roles object manages security roles for folders. The scope of the roles is determined by its parent
folder.

Roles Object Properties


The Roles object provides the following properties, some of which are read-only. To affect some read-only
properties requires user interaction or custom event procedures that use other Roles properties or
methods.

Assignments Property
Gets the names of users and groups that have been assigned to roles for the current Folder object.

Syntax
Assignments As Variant

Remarks
Returns an array of subarrays. Each subarray contains the name of the user or group and its corresponding
role name.

InheritedFromParent Property
Gets or sets whether the current Folder object inherits its role assignments from its parent object.

Syntax
InheritedFromParent As Boolean

Remarks
This property is set to False by the AddAssignment, Clear, and DeleteAssignment methods.

Confidential and Proprietary © 2021 145                                                           www.accruent.com


Roles Object Methods
The Roles object methods affect the current Folder object.

AddAssignment Method
Adds a role assignment to the current Folder object.

Syntax
AddAssignment (Assignee As String, Role As String)

Parameters

Name Description
Assignee User or group name to assign the role to.
Role Role name to assign to Assignee.

Remarks
This method sets the InheritedFromParent property to False.

Clear Method
Removes all existing role assignments from the current Folder object.

Syntax
Clear

Parameters
This method accepts no parameters.

Remarks
This method sets the InheritedFromParent property to False.

DeleteAssignment Method
Removes a role assignment from the current Folder object.

Confidential and Proprietary © 2021 146                                                           www.accruent.com


Syntax
DeleteAssignment (Assignee As String, Role As String)

Parameters

Name Description
Assignee User or group name to remove the role from.
Role Role name to remove from Assignee.

Remarks
This method sets the InheritedFromParent property to False.

Confidential and Proprietary © 2021 147                                                           www.accruent.com


Scope Object
The Scope object represents a named feature set that is configured for the current vault. A scope simplifies
and limits users' access to only the configurable features that the users need.
For more information about scopes, see the Accruent Meridian Enterprise Configuration Guide .

Scope Object Properties


The Scope object provides the following properties.

DisplayName Property
The Display Name property of the scope.

Syntax
Vault.Scope(<ScopeInternalName>).Displayname As String

Remarks
This property affects scopes defined in Meridian Enterprise Configurator, not scopes defined by the
VaultEvent_ChangeScope event.

DocumentTypes Property
Returns a semicolon-delimited string containing a list of the document types that have been configured for
the selected scope. Read-only.

Syntax
Vault.Scope(Client.CurrentScope).DocumentTypes As String

Remarks
Calling this method results in an error if the user has nothing selected.

Confidential and Proprietary © 2021 148                                                           www.accruent.com


Name Property
Returns the name of the current object. Depending on the object type, this property returns the display
name of the object or it returns the internal name and may be read-only.

Syntax
Name As String

Remarks
If the current object is a Package, it must be in the Open status to set the value.
If the current object is a User, this property is the short name of the user as stored in the user's Meridian
account information and is read-only. This property can be used to specify the recipient's email address
and either an empty string or no value set in the Address property. If an email address is specified in Name,
it must be surrounded with carets (<>). When used with Microsoft Outlook, the Name property may
contain the user's full name or last name and Outlook will attempt to resolve the name to the email
address in the default address book. Meridian user names can be shown in different formats as specified by
the server registry setting UserNameFormat described in the Accruent Meridian Enterprise Administrator's
Guide.

RootFolder Property
The name of the root folder of the scope. Read-only.

Syntax
Vault.Scope(<ScopeInternalName>).RootFolder As String

Remarks
To obtain a folder object that is the root folder of the scope, use the expression:
Vault.RootFolder.GetSubFolder(Vault.Scope
(<ScopeInternalName>).RootFolder)

Confidential and Proprietary © 2021 149                                                           www.accruent.com


Sequence Object
The Sequence object manages sequence numbers for a specific class of objects. Sequences are useful for
generating unique numbers used in calculating document names. The scope of a sequence is determined
by its parent object.

Sequence Object Properties


The Sequence object provides the following properties.

Next Property
Increment the current sequence value or start a new sequence at an optional specified value. Read-only.
The value of StartAt must be higher than the current sequence value.

Syntax
Next(StartAt)As Long

Value Property
The current sequence value. Read-only.

Syntax
Value As Long

Sequence Object Methods


The Sequence object provides the methods described below.

SetTo Method
Set the current sequence to a new number.

Syntax
SetTo(Number)

Confidential and Proprietary © 2021 150                                                           www.accruent.com


Parameters

Name Description
Number Long integer with which to set the sequence.

Return Value
The new (Long) number.

Confidential and Proprietary © 2021 151                                                           www.accruent.com


Table Object
The Table object represents a lookup list table in the current vault.

Table Object Properties


The Table object provides the following properties, all of which are read-only.

DBConnection Property
An ADO connection object. Read-only.

Syntax
DBConnection As Object

ColumnsInfo Property
A two-dimensional array of table data. Read-only.

Syntax
ColumnsInfo As Variant

DisplayName Property
The Display Name of the table as entered in Configurator. Read-only.

Syntax
DisplayName As String

Name Property
Returns the name of the current object. Depending on the object type, this property returns the display
name of the object or it returns the internal name and may be read-only.

Syntax
Name As String

Confidential and Proprietary © 2021 152                                                           www.accruent.com


Remarks
If the current object is a Package, it must be in the Open status to set the value.
If the current object is a User, this property is the short name of the user as stored in the user's Meridian
account information and is read-only. This property can be used to specify the recipient's email address
and either an empty string or no value set in the Address property. If an email address is specified in Name,
it must be surrounded with carets (<>). When used with Microsoft Outlook, the Name property may
contain the user's full name or last name and Outlook will attempt to resolve the name to the email
address in the default address book. Meridian user names can be shown in different formats as specified by
the server registry setting UserNameFormat described in the Accruent Meridian Enterprise Administrator's
Guide.

Type Property
The type of the table as one of hte AS_TQTYPE constants. Read-only.

Syntax
Type As AS_TQTYPE

Table Object Methods


The Table object provides the methods described below.

AddValues Method
Adds values to the current Table object.

Syntax
AddValues([Columns], [Values])

Parameters

Name Description
Columns Optional names of columns to add to the table.
Values Optional values to add to the table.

Confidential and Proprietary © 2021 153                                                           www.accruent.com


Clean Method
Removes all rows from the current Table object.

Syntax
Clean()

Parameters
This method accepts no parameters.

DeleteValues Method
Deletes values from the current Table object.

Syntax
DeleteValues([MatchColumns], [MatchValues])

Parameters

Name Description
MatchColumns Optional names of columns to delete from the table.
MatchValues Optional values to delete from the table.

DeleteValuesEx Method
Deletes values from the current Table object.

Syntax
DeleteValuesEx(Where As String, [Parameters])

Parameters

Name Description
Where SQL expression that specifies the values to delete.
Parameters Optional parameters.

Confidential and Proprietary © 2021 154                                                           www.accruent.com


GetValues Method
Gets values from the current Table object that match the specified criteria. If the query does not match any
values, the method returns an empty variant.

Syntax
GetValues([MatchColumns], [MatchValues], [OutColumns], [Distinct],
[OrderBy], [FieldsInfo]) As Variant

Parameters

Name Description
MatchColumns Optional array of column names to match in the table.
MatchValues Optional array of column values to match in the table. The index of each value should
match the index of its corresponding column in MatchColumns.
OutColumns Optional array of column names to return in the result.
Distinct If True, returns only the unique values. Optional.
OrderBy Optional array of column names with which to sort the returned values.
FieldsInfo Optional variant array to contain information about the returned columns. The
information includes:
FieldsInfo(0) = Name of the column in the recordset (AS_CI_NAME)
FieldsInfo(1) = Data type (AS_CI_SIZE)
FieldsInfo(2) = Size (AS_CI_TYPE)
FieldsInfo(3) = Column attributes (AS_CI_ATTR)
Note:
For the values of possible data types, see DataTypeEnum in MSDN. For the values of
possible column attributes, see FieldAttributeEnum in MSDN.

Return Value
A 2-dimension variant array with the property values in the second dimension of the array.

Remarks
The GetValues method executes an SQL query with the specified parameters. For example, the following
VBScript statement:
Vault.Table("Employees").GetValues(Array("Role","Department"), _
Array("Manager","Engineering"), _

Confidential and Proprietary © 2021 155                                                           www.accruent.com


Array("FirstName","LastName"), _
False, "LastName")
Translates into the following SQL query:
SELECT FirstName, LastName FROM Employees WHERE Role='Manager' AND
Department='Engineering' ORDER BY LastName
If the FieldsInfo parameter is specified, that array contains information about the returned value array.
This can be useful if you want a generic function that can operate with the results of different queries
regardless the output columns and the order in which order they were requested. Moreover, using
FieldsInfo, you can process results from different tables (or queries to external data sources) without
specific knowledge of the column names, which may be named differently in different tables but have the
same purpose in the context of your processing.
The following example functions demonstrate the use of FieldsInfo.
' Helper function that finds the index of a ShareName column in the
results table.
Function FindShareNameIndex(fi)
FindShareNameIndex = -1
If IsArray(fi) Then
For i = 0 To UBound(fi,1)
If fi(0,i) = "ShareName" And fi(1,i) = 202 Then
FindShareNameIndex = i
Exit Function
End If
Next
End If
End Function
Function TestFieldsInfo()
Dim fi
Dim res
res = Vault.Table("GCFShares").GetValues(,,,,,fi)
If IsArray(fi) Then
Dim sni
sni = FindShareNameIndex(fi)
TestFieldsInfo = ""
For j = 0 To UBound(res,2)
TestFieldsInfo = TestFieldsInfo & res(sni,j) & ";"
Next
Else
TestFieldsInfo = fi
End If
End Function

Confidential and Proprietary © 2021 156                                                           www.accruent.com


GetValuesEx Method
Gets values from the current Table object that match the specified criteria. If the query does not match any
values, the method returns an empty variant.

Syntax
GetValuesEx([SelectList As String], [Where As String],[GroupBy As
String], [Having As String], [OrderBy As String], _
[Parameters], [FieldsInfo]) As Variant

Parameters

Name Description
SelectList Optional comma-separated list of column names to retrieve values from the table.
Where Optional condition for matching column values to retrieve from the table.
GroupBy Optional column names to group values in the result.
Having Optional aggregate function that is a condition for grouping returned values.
OrderBy Optional comma-separated list of column names with which to sort the returned values.
Parameters Optional value or array of values to be used in a parametric query. The values do not need
to be strings. The array should contain a value for each instance of the ? character in the
SQL query.
FieldsInfo Optional variant array to contain information about the returned columns. The
information includes:
FieldsInfo(0) = Name of the column in the recordset (AS_CI_NAME)
FieldsInfo(1) = Data type (AS_CI_SIZE)
FieldsInfo(2) = Size (AS_CI_TYPE)
FieldsInfo(3) = Column attributes (AS_CI_ATTR)
Note:
For the values of possible data types, see http://msdn.microsoft.com/en-
us/library/ms675318(VS.85).aspx. For the values of possible column attributes, see
http://msdn.microsoft.com/en-us/library/ms676553(VS.85).aspx.

Return Value
A 2-dimension variant array with the property values in the second dimension of the array.

Confidential and Proprietary © 2021 157                                                           www.accruent.com


Remarks
The GetValuesEx method is functionally equivalent to GetValues. However, the GetValuesEx method
supports parameters in the same order as a standard SQL query. This may be more convenient to use than
GetValues if you are already familiar with the SQL language.
If the FieldsInfo parameter is specified, that array contains information about the returned value array.
This can be useful if you want a generic function that can operate with the results of different queries
regardless of the output columns and the order in which order they were requested. Moreover, using
FieldsInfo, you can process results from different tables (or queries to external data sources) without
specific knowledge of the column names, which may be named differently in different tables but have the
same purpose in the context of your processing.
The following example functions demonstrate the use of FieldsInfo.
' Helper function that finds the index of a ShareName column in the
results table.
Function FindShareNameIndex(fi)
FindShareNameIndex = -1
If IsArray(fi) Then
For i = 0 To UBound(fi,1)
If fi(0,i) = "ShareName" And fi(1,i) = 202 Then
FindShareNameIndex = i
Exit Function
End If
Next
End If
End Function
Function TestFieldsInfo()
Dim fi
Dim res
res = Vault.Table("GCFShares").GetValues(,,,,,fi)
If IsArray(fi) Then
Dim sni
sni = FindShareNameIndex(fi)
TestFieldsInfo = ""
For j = 0 To UBound(res,2)
TestFieldsInfo = TestFieldsInfo & res(sni,j) & ";"
Next
Else
TestFieldsInfo = fi
End If
End Function

Confidential and Proprietary © 2021 158                                                           www.accruent.com


UpdateValues Method
Updates values in the current Table object.

Syntax
UpdateValues(MatchColumns, MatchValues, SetColumns, SetValues)

Parameters

Name Description
MatchColumns Array of matching column names to update in the current table.
MatchValues Array of matching column values to update in the current table.
SetColumns Array of column names to set in the current table.
SetValues Array of column values to set in the current table.

Remarks
The UpdateValues method executes an SQL query with the specified parameters. For example, the
following VBScript statement:
Vault.Table("Employees").UpdateValues(Array("FirstName","LastName"),
Array("John","Smith"), Array(“Role”, “Department”), Array(“Manager”,
“Engineering”))
translates into the following SQL query:
UPDATE Employees SET Role='Manager' AND Department='Engineering' WHERE
FirstName='John', LastName='Smith'

UpdateValuesEx Method
Updates values in the current Table object.

Syntax
UpdateValuesEx(Where As String, Parameters, SetColumns, SetValues)

Confidential and Proprietary © 2021 159                                                           www.accruent.com


Parameters

Name Description
Where Condition for matching column values to update in the current table.
Parameters String or array of strings of values to be used in a parameterized query. The array should
contain a value for each instance of the ? character in the SQL query.
SetColumns Array of column names to set in the table.
SetValues Array of column values to set in the table.

Remarks
The UpdateValuesEx method is functionally equivalent to UpdateValues. However, the UpdateValuesEx
method supports parameters in the same order as a standard SQL query. This may be more convenient to
use than UpdateValues if you are already familiar with the SQL language.

Confidential and Proprietary © 2021 160                                                           www.accruent.com


Task Object
The Task object sends a task request to a Accruent Task Server task extension for execution, such as to
send an email. For more information about the Accruent Task Server, see the Accruent Meridian Enterprise
Administrator's Guide. For information about developing task extensions, see the Accruent Meridian
Developer's Guide.

Task Object Methods


The Vault.Task object provides the methods described below.

Reset Method
Clears the arguments of the current Task object.

Syntax
Reset()

Parameters
This method accepts no parameters.

Remarks
Reset the Task object before each task.

Set Method
Sets the value of the specified argument.

Syntax
Set(Argument As String, Value)

Parameters

Name Description
Argument The name of the argument to set.
Value The value to which to set the argument.

Confidential and Proprietary © 2021 161                                                           www.accruent.com


Remarks
The value of Argument is passed to the task extension on the Task Server as a parameter of the task to be
performed. Each task extension defines its own arguments. Refer to the documentation of the task
extension to find the appropriate argument names.
The argument names passed to Task Server extensions built with the Accruent .NET API are case-sensitive.

Submit Method
Submits the current Task object to the Task Server.

Syntax
Submit(Type As String, [FSObject As IUnknown*], [StartAt], [Priority
As Long = 0], [Server As String])

Parameters

Name Description
Type The type of task that will be executed. This must be the ProgID of the task extension that will
perform the task. The ProgID is a combination of the task extension project name and the
class name used by the Visual Basic project that produced the task extension.
FSObject Optional Document or Folder object. This parameter is only required if the task extension
uses this information.
StartAt Optional date value in Greenwich Mean Time (GMT) until which to delay the execution of the
task.
Priority Reserved for future use.
Server Optional name of the computer that is running the Task Server service. The task will be
executed on this computer. You can omit this parameter to use the default Task Server
computer.

Remarks
The argument names passed to Task Server extensions built with the Accruent .NET API are case-sensitive.

Confidential and Proprietary © 2021 162                                                           www.accruent.com


User object
The User object represents the current user and is available to all event procedures.

User Object Properties


The User object provides the following properties, all of which are read-only. To affect some read-only
properties requires user interaction or custom event procedures.
Note:
Meridian user names can be shown in different formats as specified by the server registry setting
UserNameFormat described in the AccruentMeridian Enterprise Administrator's Guide.

AllEmails Property
All email addresses of the user as stored in the user's Meridian account information. Read-only.

Syntax
AllEmails As String

Description Property
The description of the user as stored in the user's Meridian account information. Read-only.

Syntax
Description As String

EmailAddress Property
The default email address of the user as stored in the user's Meridian account information. Read-only.

Syntax
EmailAddress As String

Confidential and Proprietary © 2021 163                                                           www.accruent.com


FullName Property
The full name of the user as stored in the user's Meridian account information. Read-only.
Note:
Meridian user names can be shown in different formats as specified by the server registry setting
UserNameFormat described in the AccruentMeridian Enterprise Administrator's Guide.

Syntax
FullName As String

HasPrivilege Property
True if the user has the specified privilege for the default object (ParentFolder or WorkArea) or an optional
specified Document (expressed as Document.ParentFolder), Vault, WorkArea, or Folder object. The
Privilege argument is specified as a long integer that represents one or more of the AS_PRIVILEGES
constants. Read-only.

Syntax
HasPrivilege(Privilege, [Object]) As Boolean

HasRole Property
True if the user is assigned the specified role for the default object (ParentFolder or WorkArea) or an
optional specified Document (expressed as Document.ParentFolder), Folder, WorkArea, or Vault object.
Read-only.

Syntax
HasRole(Role, [Object]) As Boolean

Remarks
To use this property in a visibility expression to conditionally show custom properties or pages in a new
document wizard, the Object parameter must be specified as the expected destination folder of the new
document. By default, new documents do not yet have a ParentFolder value in the DocGenericEvent_
BeforeNewDocument event when the wizard is active.
If the default or a specified object does not have any roles assigned and also does not inherit any role
assignments from a parent, this property will always return True. This behavior is by design; role-based
security is disabled if there are no roles assigned in the vault. To enable role-based security and return a
different result, assign at least one role to the root of the vault.

Confidential and Proprietary © 2021 164                                                           www.accruent.com


Initials Property
The initials of the user as stored in the user's Meridian account information. Read-only.

Syntax
Initials As String

Manager Property
The manager of the user as stored in the user's Meridian account information. Read-only.

Syntax
Manager As String

Name Property
Returns the name of the current object. Depending on the object type, this property returns the display
name of the object or it returns the internal name and may be read-only.

Syntax
Name As String

Remarks
If the current object is a Package, it must be in the Open status to set the value.
If the current object is a User, this property is the short name of the user as stored in the user's Meridian
account information and is read-only. This property can be used to specify the recipient's email address
and either an empty string or no value set in the Address property. If an email address is specified in Name,
it must be surrounded with carets (<>). When used with Microsoft Outlook, the Name property may
contain the user's full name or last name and Outlook will attempt to resolve the name to the email
address in the default address book. Meridian user names can be shown in different formats as specified by
the server registry setting UserNameFormat described in the Accruent Meridian Enterprise Administrator's
Guide.

OrganizationalUnit Property
The organizational unit of the user as stored in the user's Meridian account information. Read-only.

Syntax
OrganizationalUnit As String

Confidential and Proprietary © 2021 165                                                           www.accruent.com


Profile Property
The user's personal PowerWeb settings. Each setting represents the user interface options described in the
Personal preferences article in the Meridian Enterprise User's Guide.

Syntax
Profile.UseAutoVueClientServer As Boolean
Profile.ActiveXCompatibilityMode As Boolean
Profile.CurrentTimeZone As String
Profile.Language As String (case sensitive Windows Language Code Identifier)
Profile.Locale As String (case sensitive Windows Language Code Identifier)
Profile.SiteCacheMode As Boolean
Profile.ViewRenditions As Boolean
Profile.CreateThumbnailsOnImport As Boolean
Profile.UpdateThumbNailsAfterQuickChange As Boolean
Profile.RememberVaultLocation As Boolean
Profile.ShowRibbon As Boolean Profile.ColorScheme

Remarks
Set values in the VaultEvent_NewProfile event.

Title Property
The title of the user as stored in the user's Meridian account information. Read-only.

Syntax
Title As String

User Object Methods


The User object provides no methods. To modify user properties, edit the user's Meridian account as
described in the AccruentMeridian Enterprise Administrator's Guide.

Confidential and Proprietary © 2021 166                                                           www.accruent.com


Vault Object
The Vault object represents the current vault and is available to all event procedures.

Vault Object Properties


The Vault object provides the following properties, most of which are read-only. To affect some read-only
properties requires user interaction or custom event procedures.

Argument Property
A variable stored with the Vault object for as long as the current user has the vault open. The variable is
local to the user and cannot be seen by other users.

Syntax
Argument(Name) As Variant

Remarks
The value of Name is case-sensitive.
Following are the predefined, read-only Vault object arguments that you can use to obtain additional
information that may be useful when working with particular events.

Vault object arguments

Argument Description
Vault.Argument("__$$RelatedTransmittal") A reference to a transmittal document
that is related to a submittal. Useful in
the DocGenericEvent_
BeforeNewDocument event.
Vault.Argument("__$$SubmittalSender") A reference to the sender of a submittal.
Useful in the DocGenericEvent_
BeforeNewDocument event.

For more information about arguments, see Object Arguments.

Confidential and Proprietary © 2021 167                                                           www.accruent.com


CurrentWorkArea Property
An object that represents the current work area context. Read-only.
For more information about work areas, see the AccruentMeridian Enterprise Configuration Guide.

Syntax
CurrentWorkArea As IASWorkArea

HasFeature Property
True if the specified feature is enabled for the current vault. The Feature argument is specified as a long
integer that represents one or more of the AS_FEATURES constants. Read-only.

Syntax
HasFeature(Feature) As Boolean

Moment Property
When the vault is opened to a specific moment in the past, this property returns that date and time. Read-
only.
For more information about vault history, see the AccruentMeridian Enterprise Configuration Guide.

Syntax
Moment As Date/Time

Name Property
Returns the name of the current object. Depending on the object type, this property returns the display
name of the object or it returns the internal name and may be read-only.

Syntax
Name As String

Remarks
If the current object is a Package, it must be in the Open status to set the value.
If the current object is a User, this property is the short name of the user as stored in the user's Meridian
account information and is read-only. This property can be used to specify the recipient's email address
and either an empty string or no value set in the Address property. If an email address is specified in Name,
it must be surrounded with carets (<>). When used with Microsoft Outlook, the Name property may

Confidential and Proprietary © 2021 168                                                           www.accruent.com


contain the user's full name or last name and Outlook will attempt to resolve the name to the email
address in the default address book. Meridian user names can be shown in different formats as specified by
the server registry setting UserNameFormat described in the Accruent Meridian Enterprise Administrator's
Guide.

Option Property
Gets a customization setting that is stored on the Settings page in the Vault Settings group in the
Environment branch in Meridian Enterprise Configurator. Read only. The option name is specified as
<SectionName>.<OptionName> and must match the structure and names used on the Settings page. The
supported structure is the same as used on the tabs of the Application Link Settings group in the
Environment branch in Meridian Enterprise Configurator.

Syntax
Option As String

Path Property
The path of the vault expressed as \\<Machine>\<DataStore>\<Section>.

Syntax
Path As String

Query Property
An object that represents the specified query. Read-only.

Syntax
Query(Name) As IASQuery

RootFolder Property
An object that represents the root folder of the vault. Read-only.
For more information on folder objects, see the AccruentMeridian Enterprise Configuration Guide.

Syntax
RootFolder As IASFolder

Confidential and Proprietary © 2021 169                                                           www.accruent.com


RootURL Property
The PowerWeb URL of the root folder of the vault. Read-only.

Syntax
RootUrl As String

Scope Property
An object that represents the scope with a given name.

Syntax
Scope(ScopeName As String) As IASScope

Sequence Property
An object that represents the specified vault sequence.
Important!
Using the vault name as a sequence name can cause errors and possibly crash the Meridian EDM Server
service. 
For information about the Sequence object, see Sequence Object. For information about using sequences
in file names, see the AccruentMeridian Enterprise Configuration Guide.

Syntax
Sequence(Name) As IASSequence

ServerName Property
The name of the server hosting the current vault. Read-only.

Syntax
ServerName As String

Confidential and Proprietary © 2021 170                                                           www.accruent.com


ServerProductCode Property
A number expressed as a string that represents the server product. Read-only.

Syntax
ServerProductCode As String

ServerTimeGMT Property
The system time of the server computer expressed in Greenwich Mean Time (GMT). Read-only.

Syntax
ServerTimeGMT As Date

Table Property
An object that represents the specified table. Read-only. 
For information about tables, see the AccruentMeridian Enterprise Configuration Guide.

Syntax
Table(Name) As IASTable

Task Property
An object that represents the current Task object. Read-only.
For more information about task objects, see Task Object.

Syntax
Task As IASTask

User(Name) Property
An object that represents the specified user. Read-only.
For more information about user objects, see User object .

Syntax
User(Name) As IASUser

Confidential and Proprietary © 2021 171                                                           www.accruent.com


WebAccessLocationID Property
The PowerWeb URL of the vault. Read-only.

Syntax
WebAccessLocationID As String

WorkIsolationMode Property
True if the Work Isolation Mode of the current vault is enabled. Read-only.
For more information about Work Isolation Mode, see the AccruentMeridian Enterprise Configuration
Guide.

Syntax
WorkIsolationMode As Boolean

Vault Object Methods


The Vault object provides the methods described below.

AuditEvent Method
Adds custom command events to the audit log database.

Syntax
Sub AuditEvent(EventName As String, [ObjectName As String],
[ActionArg1 As String], [ActionArg2 As String], [ActionArg3 As
String])

Parameters

Name Description
EventName The name of the event that you want to add to the audit log database.
ObjectName Optional name of the vault object upon which the custom event occurs.
ActionArg1 Optional argument that describes the action taken.
ActionArg2 Optional argument that describes the action taken.
ActionArg3 Optional argument that describes the action taken.

Confidential and Proprietary © 2021 172                                                           www.accruent.com


Remarks
Requires a Meridian FDA Module server license.
The object specified by ObjectName must not be Nothing. The optional action arguments can be anything
that you decide. Each argument should be one parameter of the action taken and should resemble the
general pattern used by the built-in audit entries listed in the AccruentMeridian FDA Module Configuration
Guide.

CallRemote Method
Executes a remote procedure call.

Syntax
CallRemote(URL As String, Username As String, _
Password As String, RemoteVault As String, _
Script As String, [Args], [Flags As Long = 2])

Parameters

Name Description
URL Location of the server with which to connect.
Username User account to use to connect to the server.
Password Password of the user account.
RemoteVault Name of the remote vault with which to connect.
Script Name of the procedure to execute on the remote server.
Args Optional arguments for the procedure to execute.
Flags Optional flags from the AS_CALLREMOTE_FLAGSS enumeration.

Example
The following examples show how to use this method.
Example function defined in the called vault:
Function RemoteTest (First, Second, Third)
RemoteTest = "RemoteTest returns: " & First & ", " & Second & ", " &
Third
End Function
Example procedure defined in the calling vault:

Confidential and Proprietary © 2021 173                                                           www.accruent.com


Sub Test_Execute(Batch)
vArg = Array ("One ", "Two", "Three")
vRes = Vault.CallRemote ("http://MyServer/Meridian", "MyUserName", _
"MyPassword", "MyVaultName", "RemoteTest", VArg, AS_CRF_
MULTIARGS)
WinMsgBox vRes
End Sub

ComposeURL Method
Gets a PowerWeb URL for the current vault.

Syntax
ComposeURL(Object As Object, [Flags As AS_URL_FLAGS = AS_URL_
FULLPATH])

Parameters

Name Description
Object An object for which to return the address.
Flags Optional long integer that represents one or more AS_URL_FLAGS constants.

Return Value
A string URL.

Remarks
The icon shown by shortcuts created with the return value of this method and the command line to
execute those shortcuts are configured with the following registry keys that are described in
AccruentMeridian Enterprise Administrator's Guide:
HKEY_CLASSES_ROOT\BlueCielo
HKEY_CLASSES_ROOT\BlueCielo\DefaultIcon
HKEY_CLASSES_ROOT\BlueCielo\shell\open\command
The URL for the rendition of a document can be calculated by appending ;rend to the URL of the main
document as in the following example:
http://<ServerName>/Meridian/<VaultName>/MyDocument.doc;rend

Confidential and Proprietary © 2021 174                                                           www.accruent.com


DisplayName Method
Returns the display name of a specified scope.

Syntax
Vault(Scope As String).DisplayName

Parameters

Name Description
Scope The name of the scope for which to return the display name.

Return Value
The display name of the specified scope.

ExecSQL Method
Executes an SQL query using the specified connection string.

Syntax
ExecSQL(Connection As String, Query As String, [Parameters])

Parameters

Name Description
Connection A valid connection string for the database with which to execute the query.
This parameter also accepts a variable that represents one of the following vault
databases. The variables are case-sensitive.
$$TransManDB — the Transmittal Management Module database (if installed)
$$UserDB — the user account database
Note:
When the Use Enterprise Server for user management option is enabled in the
EDM Server properties in Meridian Enterprise Administrator, the reserved word
$$UserDB cannot be used in VBScript with the Vault.ExecSQL method to access the
Meridian Enterprise Server user database.
$$<QueryName> – an external table query connection string created as described in the
AccruentMeridian Enterprise Configuration Guide

Confidential and Proprietary © 2021 175                                                           www.accruent.com


Name Description
Query A valid SQL query expression.
Parameters Optional value or array of values to be used in a parametric query. The values do not need
to be strings. The array should contain a value for each instance of the ? character in the
SQL query.

FindDocuments Method
Searches for documents in the Main area of the current vault.

Syntax
FindDocuments([WildCard As String], [DocumentTypeNames As Variant],
[Criteria As Variant], OrSearch As Boolean) _
As IASDocuments

Parameters

Name Description
WildCard Optional string that represents a file system wildcard pattern. If omitted, the
scope of file names will include all documents (*.*).
DocumentTypeNames Optional variant array of document type names to which to restrict the search
result. If omitted, the scope of document types will include all document types.
Criteria Optional variant array of property filter criteria.
OrSearch Optional Boolean that if set to True specifies a Boolean OR search be
performed. The default is False.

Return Value
Returns a collection of Document Object objects matching the specified parameters.

Remarks
The Criteria parameter can be specified as a single criterion array or as an array of criterion arrays. Each
criterion array contains a property name, operator, and an optional value similar to the Find command in
Meridian PowerUser. For example, Custom.ProjectNr, equals, 2134, where equals is the operator.
The search operators that are supported are those in the IC_OPERATOR constants enumeration. The
following table lists the supported operators and the abbreviations, symbols, and constants that may be
used:

Confidential and Proprietary © 2021 176                                                           www.accruent.com


Search operator options

Operator Abbreviation Symbol Constant


contains, in C * IC_OP_CONTAINS

equals IC_OP_DATE_EQUALS

not equal IC_OP_DATE_NOT_EQUAL


doswildcard IC_OP_DOSWILDCARD
empty EM () IC_OP_EMPTY
equals, equal E EQ = IC_OP_EQUALS
less L < IC_OP_LESS
less than or equal LE <= IC_OP_LESS_EQUAL
like LI % IC_OP_LIKE
more than M > IC_OP_MORE
more than or equal ME >= IC_OP_MORE_EQUAL
not contains NC, NOT IN IC_OP_NOT_CONTAINS
not empty NEM IC_OP_NOT_EMPTY
not equal NEQ, NE <> IC_OP_NOT_EQUAL
not like NLI, NL IC_OP_NOT_LIKE
not starts with NSW IC_OP_NOT_STARTSWITH
starts with SW IC_OP_STARTSWITH

Note:
l The expression Vault.FindDocuments(<Criteria>).Count will return the number of
documents that are found.
l The expression Vault.FindDocuments(<Criteria>).Properties will return 25
values for each document found without the property names, in no particular order.
l The expression Vault.FindDocuments(<Criteria>).Document
(Document.ID).FileName will return the file name of a document if it matches the specified
parameters.
l If you want to find a document with a specific ID, use the Vault.GetDocument method described in
GetDocument method instead. Executing an expression such as Vault.FindDocuments.Document
(ID) will cause the server to first create a collection of all documents in the vault and then search
within that collection for the document with the specified ID. Such an operation can result in a large
load on the server and take an excessive amount of time compared to using the
Vault.GetDocument method.

Confidential and Proprietary © 2021 177                                                           www.accruent.com


l For best results when searching on date (day without time) values, use the operators with names
that begin with IC_OP_DATE. For date with time (moment) searches, use the other operators.
l This method can return different results if it is called within the Document_AfterNewDocument
event depending on whether Hypertrieve 3 or Hypertrieve 5 is used as the database engine of the
vault. If the new document name matches the WildCard parameter, the collection of document IDs
returned by a Hypertrieve 5 vault will contain the new document. A Hypertrieve 3 vault will not
contain the new document. To make your script compatible with both vault types, it should filter
the ID of the new document out of the search results. Similarly, if no results are expected (such as
testing for a unique document name) but one document is returned, test whether it is the new
document and proceed accordingly.

Example
The following example demonstrates use of the FindDocuments method to display the results of a search
executed with the specified parameters.
Sub SearchCount_Execute(Batch)
Dim StrMask
StrMask = "*1*.*"

Dim MultipleDocTypes
MultipleDocTypes = Array("My_Doc_Type", "Hybrid_Doc_Type")

Dim MultipleCriteria
MultipleCriteria = Array(_
Array("Custom.CI", IC_OP_MORE, 200),_
Array("Custom.CI", IC_OP_LESS, 300),_
Array("Custom.CS", IC_OP_CONTAINS, "o"),_
Array("Custom.CStr", IC_OP_CONTAINS, "iv"),_
Array("Custom.LOL", IC_OP_EQUALS, "a-z"),_
Array("AMVersionablePropertySet._VERSIONNUMBER", IC_OP_LESS,
2),_
Array("Custom.CDT", IC_OP_LESS, (DateSerial(1983,07,12))),_
Array("NewPS.CB", IC_OP_EQUALS, False))

Dim bool
bool = True

Dim Str
Str = ""

Dim Document

For Each Document In Vault.FindDocuments(StrMask,


MultipleDocTypes, _
MultipleCriteria, bool)
str = str &_
" FileName - > " & Document.FileName & vbCrLf &_
" Document.DocumentType.DisplayName - > " & _
Document.DocumentType.DisplayName & vbCrLf &_

Confidential and Proprietary © 2021 178                                                           www.accruent.com


" Custom.CI - > " & Document.CI & vbCrLf &_
" Custom.CS - > " & Document.CS & vbCrLf &_
" Custom.CStr - > " & Document.CStr & vbCrLf &_
" Custom.CDT - > " & Document.CDT & vbCrLf &_
" NewPS.CB - > " & Document.NewPS_CB & vbCrLf &_
" NewPS.CM - > " & Document.NewPS_CM & vbCrLf &_
" Custom.LOL - > " & Document.Custom_LOL & vbCrLf &_
" Revision - > " & Document.Revision & vbCrLf & vbCrLf
Next

WinMsgBox "Total number of documents found is " &_


Vault.FindDocuments(StrMask, MultipleDocTypes,
MultipleCriteria, bool).Count & _
vbCrLf & vbCrLf & Str
End Sub

GetDistinctValues Method
Returns the unique values of the specified property.

Syntax
GetDistinctValues(PropertyName As String, MaxValues As Long = -1)

Parameters

Name Description
PropertyName The name of the property for which to retrieve values.
MaxValues The maximum number of values to return. The default of -1 returns all values.

Return Value
An array of the values for the specified property.

GetDocument Method
Returns the document object for a specified ID.

Syntax
GetDocument(ID As String) As IASDocument

Confidential and Proprietary © 2021 179                                                           www.accruent.com


Parameters

Name Description
ID Global ID of the document to retrieve.

Return Value
A Document object.

GetGroups Method
Returns the names of the current Meridian user groups. For more information about user groups, see the
AccruentMeridian Enterprise Administrator's Guide.

Syntax
GetGroups(GroupColumns As Long = 0, [User As String])

Parameters

Name Description
GroupColumns The number of columns of group information to retrieve. The default of 0 returns all
columns.
User Optional name of the user for which to return groups that the user is a member of.

Return Value
Returns an array of user group information. The dimensions of the array match the number of columns
specified for GroupColumns.

GetPropertyNames Method
Get the property names for the specified property set.

Syntax
GetPropertyNames(PropertySetName As String) As Array

Confidential and Proprietary © 2021 180                                                           www.accruent.com


Parameters

Name Description
PropertySetName Name of the property set from which to return property names.

Return Value
A string array of property names.

GetUsers Method
Returns the names of the current Meridian user accounts. For more information about user accounts, see
the AccruentMeridian Enterprise Administrator's Guide.

Syntax
GetUsers(UserColumns As Long = 0, [Group As String])

Parameters

Name Description
UserColumns The number of columns of user information to retrieve. The default of 0 returns all
columns.
Group Optional name of the group for which to return users that are members.

Return Value
Returns an array of user group information. The dimensions of the array match the number of columns
specified for UserColumns.

RootFolder Method
Returns the root folder of a specified scope.

Syntax
Vault(Scope As String).RootFolder

Confidential and Proprietary © 2021 181                                                           www.accruent.com


Parameters

Name Description
Scope The name of the scope for which to return the root folder name.

Return Value
The root folder of the specified scope.

RunShellCommand Method
Opens a window and passes a specified command line to the operating system to execute. The command
may be executed on the application server.

Syntax
RunShellCommand(Command As String, [ShowWindow As IC_SHOWWINDOW As IC_
SW_SHOWNORMAL], [AtServer As Boolean = False])

Parameters

Name Description
Command The command line to execute.
ShowWindow Optional window style specified as one of the IC_SHOWWINDOW constants.
AtServer Optional flag to run the command on the server.

SendNotification Method
Sends a notification email message for a specified object.

Syntax
SendNotification (NotificationName As String, Object As Object)

Confidential and Proprietary © 2021 182                                                           www.accruent.com


Parameters

Name Description
NotificationName The internal name of a notification definition created in Meridian Enterprise
Configurator. The internal name can be seen in the tooltip that appears when the
mouse cursor is hovered over the notification name.
Object The object about which to send the notification, typically a document object.

Remarks
For information about creating notification definitions, see the AccruentMeridian Enterprise Configuration
Guide.

Confidential and Proprietary © 2021 183                                                           www.accruent.com


Viewer Object
The Viewer object represents the Meridian viewer in the client applications.

Viewer Object Properties


The Viewer object provides the following properties.

IsPreview Property
True if the current document is being shown in the Print Preview window. Read-only.

Syntax
IsPreview As Boolean

Watermark Property
An object that represents the current watermark settings. For information on configuring watermark
printing with the Watermark properties, see the AccruentMeridian Enterprise Configuration Guide. This
property supports two lines of text.

Syntax
Watermark As IASWatermark

Example
To achieve two lines, you can use a line break:
Client.Viewer.WaterMark.TitleText = "Printed by: " & User.FullName +
vbCrLf + " on: " & DateValue(Today)

IsRendition Property
Indicates whether the viewed file is a rendition or the native content stream of the current document.
Read-only.

Syntax
IsRendition As Boolean

Confidential and Proprietary © 2021 184                                                           www.accruent.com


WaitingList Object
The WaitingList object represents the waiting list that the current Document object is associated with. The
properties of the WaitingList object are described below.

WaitingList Object Properties


The WaitingList object provides the following properties.

Documents Property
All project copies in the waiting list that the current document belongs to. Read-only.

Syntax
Documents As IASDocuments

Count Property
Number of documents in the waiting list. Read-only.

Syntax
Count As Long

Document Property
Allows you to get a document by index or id. Read-only.

Syntax
Document As IASDocument15

Property Property
Gets or sets the value of the specified (String) document property.

Syntax
Property(Name) As Variant

Confidential and Proprietary © 2021 185                                                           www.accruent.com


Priority Property
Priority of the project copy in the waiting list. Read-only.

Syntax
Priority As Long

WaitingList Object Methods


The WaitingList object provides the following methods.

Move Method
Changes the priority of a project copy in the waiting list for a document.

Syntax
Move([ProjectCopy As IASDocument15],[shiftValue As Long])

Parameters

Name Description
ProjectCopy The project copy that the priority is to be changed for.
shiftValue The waiting list priority that you want to set for the document.

Remove Method
Removes the project copy from the waiting list.

Syntax
Move([ProjectCopy As IASDocument15])

Parameters

Name Description
ProjectCopy The project copy to be removed from the waiting list.

Confidential and Proprietary © 2021 186                                                           www.accruent.com


Workflow Object
The Workflow object represents a workflow definition. The Workflow object is available to the Document
and Folder (if the Advanced Project Workflow Module is installed) objects.

Workflow Object Properties


The Workflow object provides following properties, all of which are read-only.

DisplayName Property
The name of the workflow as seen by users. Read-only.

Syntax
DisplayName As String

Name Property
Returns the name of the current object. Depending on the object type, this property returns the display
name of the object or it returns the internal name and may be read-only.

Syntax
Name As String

Remarks
If the current object is a Package, it must be in the Open status to set the value.
If the current object is a User, this property is the short name of the user as stored in the user's Meridian
account information and is read-only. This property can be used to specify the recipient's email address
and either an empty string or no value set in the Address property. If an email address is specified in Name,
it must be surrounded with carets (<>). When used with Microsoft Outlook, the Name property may
contain the user's full name or last name and Outlook will attempt to resolve the name to the email
address in the default address book. Meridian user names can be shown in different formats as specified by
the server registry setting UserNameFormat described in the Accruent Meridian Enterprise Administrator's
Guide.

Confidential and Proprietary © 2021 187                                                           www.accruent.com


State Property
An object that represents the specified workflow state. Read-only.

Syntax
State(StateName) As IASWorkflowState

Transition Property
An object that represents the specified workflow transition. Read-only.

Syntax
Transition(TransitionName) As IASWorkflowState

Remarks
The Transition object provides a SignatureRequired property that can be used to determine if the
transition requires electronic signatures.
l The property is False if the electronic signature feature is disabled or if it is enabled but the transition
does not require electronic signatures.
l The property is True if the feature is enable and the transition requires one or more electronic
signatures.

Confidential and Proprietary © 2021 188                                                           www.accruent.com


WorkflowState Object
The WorkflowState object represents a state in a workflow definition. The WorkflowState object is
available to the Document and Folder (if the Advanced Project Workflow Module is installed) objects.

WorkflowState Object Properties


The WorkflowState object provides the following properties, all of which are read-only.

DisplayName Property
The name of the workflow state as seen by users. Read-only.

Syntax
DisplayName As String

Name Property
Returns the name of the current object. Depending on the object type, this property returns the display
name of the object or it returns the internal name and may be read-only.

Syntax
Name As String

Remarks
If the current object is a Package, it must be in the Open status to set the value.
If the current object is a User, this property is the short name of the user as stored in the user's Meridian
account information and is read-only. This property can be used to specify the recipient's email address
and either an empty string or no value set in the Address property. If an email address is specified in Name,
it must be surrounded with carets (<>). When used with Microsoft Outlook, the Name property may
contain the user's full name or last name and Outlook will attempt to resolve the name to the email
address in the default address book. Meridian user names can be shown in different formats as specified by
the server registry setting UserNameFormat described in the Accruent Meridian Enterprise Administrator's
Guide.

Confidential and Proprietary © 2021 189                                                           www.accruent.com


Type Property
The type of the workflow state expressed as one of the  AS_WORKFLOW_STATE_TYPE constants. Read-
only.

Syntax
Type As AS_WORKFLOW_STATE_TYPE

Workflow Property
The parent workflow object. Read-only.

Syntax
Workflow As IASWorkflow

Confidential and Proprietary © 2021 190                                                           www.accruent.com


WorkflowTransition Object
The WorkflowTransition object represents a transition in a workflow definition. The WorkflowTransition is
available to the Document and Folder objects if the Advanced Project Workflow Module is installed.

WorkflowTransition Object Properties


The WorkflowTransition object provides the following properties, all of which are read-only.

CreateNewRevision Property
If True, this transition creates a new revision of a document.

Syntax
CreateNewRevision As Boolean

DisplayName Property
The name of the workflow transition as seen by users. Read-only.

Syntax
DisplayName As String

Name Property
Returns the name of the current object. Depending on the object type, this property returns the display
name of the object or it returns the internal name and may be read-only.

Syntax
Name As String

Remarks
If the current object is a Package, it must be in the Open status to set the value.
If the current object is a User, this property is the short name of the user as stored in the user's Meridian
account information and is read-only. This property can be used to specify the recipient's email address
and either an empty string or no value set in the Address property. If an email address is specified in Name,
it must be surrounded with carets (<>). When used with Microsoft Outlook, the Name property may
contain the user's full name or last name and Outlook will attempt to resolve the name to the email
address in the default address book. Meridian user names can be shown in different formats as specified by

Confidential and Proprietary © 2021 191                                                           www.accruent.com


the server registry setting UserNameFormat described in the Accruent Meridian Enterprise Administrator's
Guide.

SourceState Property
The source state of the transition. Read-only.

Syntax
SourceState As IASWorkflowState

TargetState Property
The target state of the transition. Read-only.

Syntax
TargetState As IASWorkflowState

Workflow property
The parent workflow definition. Read-only.

Syntax
Workflow As IASWorkFlow

Confidential and Proprietary © 2021 192                                                           www.accruent.com


Meridian Functions
Meridian provides a number of functions in VBScript that you can use with Meridian objects and their
properties. The functions are listed in the Object Browser in the Meridian Enterprise Script Editor.
Note:
l Some of the Meridian functions accept as parameters one or more predefined Meridian constants.
The available Meridian constants can be found in the Object Browser in the Meridian Enterprise
Script Editor.
l The functions that are provided by the Meridian Enterprise Asset Management Module are not
listed in the Meridian Enterprise Script Editor.

Confidential and Proprietary © 2021 193                                                           www.accruent.com


AIMS_Commands Function
Adds up to three custom Meridian Enterprise command buttons to the Meridian Explorer feedback page.

Syntax
Function AIMS_Commands() As Array

Parameters
This function accepts no parameters.

Remarks
Each command button can run a VBScript function in the context of the current document in the Meridian
Enterprise vault as demonstrated in the following example. The function must return an array of arrays that
each define the command button caption and the name of a function to invoke when the button is clicked.

Example
Function AIMS_Commands()
'For each button, provide a caption and function name in an array
btnA = Array("Command A", "Do_ButtonA")
btnB = Array("Command B", "Do_ButtonB")
btnC = Array("Command C", "Do_ButtonC")

'Return the array of commands


AIMS_Commands= Array(btnA , btnB , btnC)
End Function

Sub Do_ButtonA()
Document.Area1= "A"
Document.ChangeManagementRemarks = "Option A chosen"
Document.Log "Button A clicked at : " & CStr(Vault.ServerTimeGMT)
End Sub

Confidential and Proprietary © 2021 194                                                           www.accruent.com


AIMS_Properties Function
Invoked when a Meridian Explorer detail page is shown that has the Enable feedback functionality option
enabled.

Syntax
Function AIMS_Properties()

Parameters
This function accepts no parameters.

Remarks
Use this method to work with the feedback page property information as demonstrated in the following
example.

Example
Function AIMS_Properties()
' For each property, return its caption and value in an array
p1 = Array("Asset description", Document.Area1)
p2 = Array("My name", "Joe Engineer")

'Return the array of properties


AIMS_Properties = Array(p1, p2)
End Function

Confidential and Proprietary © 2021 195                                                           www.accruent.com


AIMS_UpdateChangeManagement Function
Invoked when a user saves changes to a Meridian Explorer detail page that has the Enable feedback
functionality option enabled.

Syntax
Function AIMS_UpdateChangeManagement (Remarks As String, RequestType
As String)

Parameters

Name Description
Remarks The value that the user entered for the Remarks (Custom.ChangeManagementRemarks)
property.
RequestType The value that the user entered for the Request type
(Custom.ChangeManagementRequestType) property.

Remarks
Use this function to modify the values that are saved by the user's input or to set other properties as
demonstrated in the following example.

Example
Function AIMS_UpdateChangeManagement(remarks, requestType)
Document.ChangeManagementRemarks = remarks
Document.ChangeManagementRequestType = requestType
Document.ApplyPropertyValues

Call Document.Log(CStr(User.Name + " : " + requestType))

AIMS_UpdateChangeManagement = ""
End Function

Confidential and Proprietary © 2021 196                                                           www.accruent.com


AMCreateObject Function
Creates and returns a reference to an object that is provided by an automation server. For more
information about using the AMCreateObject function, see Automation Objects.

Syntax
AMCreateObject(ProgID As String, [OnServer As Boolean = False]) As
Object

Parameters

Name Description
ProgID A combination of the automation server name and the class name of the object to create.
OnServer If this parameter is True, the object is created on the Meridian server instead of on the client
computer. This parameter is meaningless in PowerWeb because the server is also the client.

Remarks
The normal VBScript CreateObject function is suitable for creating automation objects that do not act upon
Meridian objects. For access to Meridian objects, use AMCreateObject instead, which works the same as
CreateObject but also passes the current Repository object to the IAMCommandSetInitialize interface of
the automation server. For more information on integrating Visual Basic user interface extensions with
VBScript, see the Accruent Meridian Developer's Guide.

Confidential and Proprietary © 2021 197                                                           www.accruent.com


AMMGetCustomColumnHeaders Function
Returns an array of column names that are displayed in the Drawing Tags dialog box.

Syntax
Function AMMGetCustomColumnHeaders() As String

Parameters
This function accepts no parameters.

Example
Function AMMGetCustomColumnHeaders()
Dim mheaders(1)
mheaders(0) = "Type Name"
AMMGetCustomColumnHeaders = mheaders
End Function

Remarks
Called once during dialog box initialization.

Confidential and Proprietary © 2021 198                                                           www.accruent.com


AMMGetCustomColumnValues Function
Returns an array of column values for the Drawing Tags dialog box.

Syntax
Function AMMGetCustomColumnValues(TagId As String, Status As Byte,
VaultObjectProperties As String,
DrawingObjectProperties As String) As String

Parameters

Name Description
TagId Tag number.
Status Tag reference status described in the following table.
VaultObjectProperties Array of the property values for the Meridian Enterprise object in the form
Array(AMObjectId, Referenced).
The dimensions of the array are as follows:
l AMObjectId – a string value that uniquely identifies the object in

Meridian Enterprise. If the object is not found in Meridian Enterprise,


the value is Nothing
l Referenced – a Boolean value indicating whether the object has a

tag reference
DrawingObjectProperties Array of the property values for the asset in the form Array(TagType,
X, Y, LayerName, PnIDProperties).
The dimensions of the array are as follows:
l TagType – the string name of the tag type

l X – a string that contains the X coordinate provided by PnIDLink_

GetAssetCoordinates
l Y – a string that contains the Y coordinate provided by PnIDLink_

GetAssetCoordinates
l LayerName – the string name of the layer on which the asset exists

l PnIDProperties – an array of property values for the asset in the

form Array(PnIDProperty1, … PnIDPropertyN). The


names of the properties are returned by the
AMMPropertiesToBeRequested Function.

Confidential and Proprietary © 2021 199                                                           www.accruent.com


Status parameter byte values

Value Status A B C D E F Comment


0 NotDefined n/a n/a n/a n/a n/a n/a Status is not calculated yet. This
status cannot be sent during a
correct request.
1 Ok + + + + - -
2 NotLinked + + - + - -
3 OnlyInDocument - + n/a n/a n/a -
4 MismatchFound + + - - - -
5 MismatchReferenced + + + - - -
6 CoercedReference + - + n/a - n/a
7 OnlyInVault + - - n/a - n/a Object with this status exists just
after unlink vault object with
CoercedReference status. If the
object will not be relinked (by Link
or Assign) then the row will be
deleted on the next refresh.
8 DuplicatesInVault + ? ? ? + -
9 DuplicatesInDrawing ? + ? ? - +
10 Duplicates + + ? ? + +
254 Error n/a n/a n/a n/a n/a n/a Status calculation failed for any
reason.

Key
l A — vault object exists
l B — drawing object exists
l C — reference exists
l D — tag type of vault object is matched with one of drawing object
l E — vault objects with duplicate tag values exist
l F — drawing objects with duplicate tag values exist
l ? — condition is not checked
l n/a — not available

Confidential and Proprietary © 2021 200                                                           www.accruent.com


Example
Function AMMGetCustomColumnValues(TagId, Status,
VaultObjectProperties, DrawingObjectProperties)
Dim mCustomColumnValues(1)
Dim mArray
If Not IsNull(DrawingObjectProperties) And IsArray
(DrawingObjectProperties) Then
mArray = DrawingObjectProperties(4)
If Not IsNull(mArray) And IsArray(mArray) Then
mCustomColumnValues(0) = mArray(0)
AMMGetCustomColumnValues = mCustomColumnValues
End If
End If
End Function

Remarks
Called for every asset in the drawing.

Confidential and Proprietary © 2021 201                                                           www.accruent.com


AMMGetReportCustomHeaderValues Function
Returns values to be placed in the header and footer area of the Excel report.

Syntax
Function AMMGetReportCustomHeaderValues (AccumulatedData As Variant)
As Variant

Parameters

Name Description
AccumulatedData A variant that contains user-defined data that can be accumulated from call to call
and passed from the AMMGetReportTableRowValues Function.

Remarks
Called once after the last call to AMMGetReportTableRowValues that provides the AccumulatedData
parameter.

Confidential and Proprietary © 2021 202                                                           www.accruent.com


AMMGetReportTableRowValues Function
Returns the array of column values for the Excel report.

Syntax
Function AMMGetReportTableRowValues(TagId As String, Status As Byte,
VaultObjectProperties As String,
DrawingObjectProperties As String, AccumulatedData As Variant) As
String

Parameters

Name Description
TagId Tag number
Status Tag reference status described in the following table
VaultObjectProperties Array of the property values for the Meridian Enterprise object in the form
Array(AMObjectId, Referenced).
The dimensions of the array are as follows:
l AMObjectId – a string value that uniquely identifies the object in

Meridian Enterprise. If the object is not found in Meridian Enterprise,


the value is Nothing.
l Referenced – a Boolean value indicating whether the object has
a tag reference.
DrawingObjectProperties Array of the property values for the asset in the form Array(TagType,
X, Y, LayerName, PnIDProperties).
The dimensions of the array are as follows:
l TagType – the string name of the tag type

l X – a string that contains the X coordinate provided by PnIDLink_

GetAssetCoordinates
l Y – a string that contains the Y coordinate provided by PnIDLink_

GetAssetCoordinates
l LayerName – the string name of the layer on which the asset exists

l PnIDProperties – an array of property values for the asset in the

form Array(PnIDProperty1, … PnIDPropertyN). The


names of the properties are returned by the
AMMPropertiesToBeRequested Function.

Confidential and Proprietary © 2021 203                                                           www.accruent.com


Name Description
AccumulatedData A variant that contains user-defined data that can be accumulated from call
to call and then passed to the AMMGetReportCustomHeaderValues
Function.

Status parameter byte values

Value Status A B C D E F Comment


0 NotDefined n/a n/a n/a n/a n/a n/a Status is not calculated yet. This
status cannot be sent during a
correct request.
1 Ok + + + + - -
2 NotLinked + + - + - -
3 OnlyInDocument - + n/a n/a n/a -
4 MismatchFound + + - - - -
5 MismatchReferenced + + + - - -
6 CoercedReference + - + n/a - n/a
7 OnlyInVault + - - n/a - n/a Object with this status exists just
after unlink vault object with
CoercedReference status. If the
object will not be relinked (by Link
or Assign) then the row will be
deleted on the next refresh.
8 DuplicatesInVault + ? ? ? + -
9 DuplicatesInDrawing ? + ? ? - +
10 Duplicates + + ? ? + +
254 Error n/a n/a n/a n/a n/a n/a Status calculation failed for any
reason.

Key
l A — vault object exists
l B — drawing object exists
l C — reference exists
l D — tag type of vault object is matched with one of drawing object
l E — vault objects with duplicate tag values exist
l F — drawing objects with duplicate tag values exist

Confidential and Proprietary © 2021 204                                                           www.accruent.com


l ? — condition is not checked
l n/a — not available

Remarks
Called for every asset in the drawing.

Confidential and Proprietary © 2021 205                                                           www.accruent.com


AMMMainTagDocumentId Function
This user-defined function is invoked when users select a folder. Implement this function to return the ID of
the main tag object associated with the active folder. If this function returns the ID of an existing document
of the document type that is specified for the Object document type option on the AMM Settings tab,
then the Where Used property page of the main tag object is shown for the active folder.

Syntax
Function AMMMainTagDocumentId ()

Parameters
This function accepts no parameters.

Example
The following example merely returns the first tag document found in the active folder. The function can be
implemented with different search criteria to return a more specific tag document.
Function AMMMainTagDocumentId ()
Dim Criteria
Dim FolderDocuments

Criteria = Array(Array _
'Internal name of the Parent Folder ID property

("AMDocumentPropertySet.*XC4800881716f11d1b47b000000000000%", _
IC_OP_EQUALS, Folder.ID))

'Search in the folder


Set FolderDocuments = Vault.FindDocuments(,Array("TagObject"),
Criteria, False)

If FolderDocuments.Count > 0 Then


'Return the first document ID
'Your implementation should return the document ID
'that meets your requirements
AMMMainTagDocumentId = FolderDocuments.Document(0).ID
End If
End Function

Confidential and Proprietary © 2021 206                                                           www.accruent.com


AMMPropertiesToBeRequested Function
Returns an array of asset properties values that will be passed to AMMGetCustomColumnValues.

Syntax
Function AMMPropertiesToBeRequested() As String

Parameters
This function accepts no parameters.

Example
Function AMMPropertiesToBeRequested()
Dim mpropertyNames(1)
mpropertyNames(0) = "_PREDEF_NAME_FOR_TYPE_DISP_NAME_"
AMMPropertiesToBeRequested = mpropertyNames
End Function

Remarks
To retrieve the localized value of the ClassName property of AutoCAD P&ID tags, use the special property
name _PREDEF_NAME_FOR_TYPE_DISP_NAME_.

Confidential and Proprietary © 2021 207                                                           www.accruent.com


AMMTags4TagPageIsVisible Function
Implement this user-defined function to control the visibility of the Tags property page for proxy tags in the
Meridian Enterprise client applications.

Syntax
Function AMMTags4TagPageIsVisible ()

Parameters
This function accepts no parameters.

Example
Function AMMTags4TagPageIsVisible ()
AMMTags4TagPageIsVisible = InStr(1, Document.FileName, "object") =
1
End Function

Confidential and Proprietary © 2021 208                                                           www.accruent.com


AMMTagsManageLinksIsAllowed Function
User-defined function that controls activation of the Manage Links button in the Manage Document Links
dialog box. The button is enabled if this function is not defined or returns True. The button is disabled if this
function is defined and returns False.

Syntax
Function AMMTagsManageLinksIsAllowed()

Parameters
This function accepts no parameters.

Example
Function AMMTagsManageLinksIsAllowed(TagObjectID)
' Disable button for released tag
Dim TagObject
Set TagObject= Vault.GetDocument(TagObjectID)
AMMTagsManageLinksIsAllowed = TagObject.WorkFlowState <> AS_WF_
RELEASED
End Function

Remarks
If the vault uses proxy documents for folder linking, the function must implement logic that determines
whether the current document is a proxy document or is a main tag document. For more information
about folder linking, see the Accruent Meridian Enterprise Server Administrator's Guide.

Confidential and Proprietary © 2021 209                                                           www.accruent.com


AMMTagsPageIsVisible Function
Implement this user-defined function to control the visibility of the Tags property page for documents in
the Meridian Enterprise client applications. The page is visible if this function returns True.

Syntax
Function AMMTagsPageIsVisible ()

Parameters
This function accepts no parameters.

Example
Function AMMTagsPageIsVisible ()
AMMTagsPageIsVisible = InStr(1, Document.FileName, "DWG") = 1
End Function

Confidential and Proprietary © 2021 210                                                           www.accruent.com


AMMUseMainTag Function
Implement this user-defined function to show the Where Used property page for folders in addition to
documents in the Meridian Enterprise client applications. The folders must have an associated main tag.
The tag is identified by the AMMMainTagDocumentId function described in AMMMainTagDocumentId
Function. The page is visible if this function returns True.

Syntax
Function AMMUseMainTag()

Parameters
This function accepts no parameters.

Example
Function AMMUseMainTag()
AMMUseMainTag = True
End Function

Confidential and Proprietary © 2021 211                                                           www.accruent.com


AMMWhereUsedManageLinksIsAllowed Function
User-defined function that controls activation of the Manage Links button in the Manage Tag Links dialog
box. The button is enabled if this function is not defined or returns True. The button is disabled if this
function is defined and returns False.

Syntax
Function AMMWhereUsedManageLinksIsAllowed()

Parameters
This function accepts no parameters.

Example
Function AMMWhereUsedManageLinksIsAllowed()
' The current document is a main tag
' Search for proxy document
Dim Drawing
Set Drawing = FindDoc(Document.ParentFolder.ID, "_M", ".dwg",
"AutoPlant")
' If proxy document was not found, use main tag.
If Drawing Is Nothing Then
Drawing = Document
End If
' Allow editing when document is not released.
AMMWhereUsedManageLinksIsAllowed = Drawing.WorkFlowState <> AS_WF_
RELEASED
End Function

Remarks
If the vault uses proxy documents for folder linking, the function must implement logic that determines
whether the current document is a proxy document or a main tag document as shown in the preceding
example. For more information about folder linking, see the Accruent Meridian Enterprise Server
Administrator's Guide.

Confidential and Proprietary © 2021 212                                                           www.accruent.com


AMMWhereUsedPageIsVisible Function
Implement this user-defined function to control the visibility of the Where Used property page for proxy
tags in the Meridian Enterprise client applications. The page is visible if this function returns True.

Syntax
Function AMMWhereUsedPageIsVisible()

Parameters
This function accepts no parameters.

Example
Function AMMWhereUsedPageIsVisible()
AMMWhereUsedPageIsVisible = InStr(1, Document.FileName, "DWG") = 1
End Function

Confidential and Proprietary © 2021 213                                                           www.accruent.com


DebugAssert Function
During VBScript debugging, displays a message if the specified condition fails.

Syntax
DebugAssert(Condition As Boolean, FalseMessage As String)

Parameters

Name Description
Condition A conditional expression to evaluate.
FalseMessage The message to display.

Remarks
Not available in PowerWeb.

Confidential and Proprietary © 2021 214                                                           www.accruent.com


FileExtension Function
Returns the file extension of a specified file.

Syntax
FileExtension(FileName As String) As String

Parameters

Name Description
FileName The full name of the file for which to return the file extension.

Remarks
Also returns the period, for example, .doc.

Confidential and Proprietary © 2021 215                                                           www.accruent.com


FileRoot Function
Returns the name of the specified file without the extension or path.

Syntax
FileRoot(FullFileName As String) As String

Parameters

Name Description
FullFileName The fully qualified path of a file for which to return the file root.

Confidential and Proprietary © 2021 216                                                           www.accruent.com


FormatSequenceAlfa Function
Returns a number converted into a character-based code and optionally prefixes characters until the
specified string length is reached.

Syntax
FormatSequenceAlfa(Value As Long, [PrefixChar As String], [Length As
Long = 0], [Compatibility As Boolean = False]) As String

Parameters

Name Description
Value The number to convert.
PrefixChar The character to repeat as a prefix.
Length The total length of the string to create.
Compatibility If set to True, calculates a code that is compatible with the now obsolete AM-WorkFlow
system.

Remarks
Use this function to format sequence numbers to a standard-length string for use in calculating document
or folder names.

Confidential and Proprietary © 2021 217                                                           www.accruent.com


FormatSequenceAlfaNum Function
Returns a number converted into an alphanumeric code and optionally prefixes zeros until the specified
string length is reached.

Syntax
FormatSequenceAlfaNum(Value As Long, [Length As Long = 0],
[Compatibility As Boolean = False]) As String

Parameters

Name Description
Value The number to convert.
Length The total length of the string to create.
Compatibility If set to True, calculates a code that is compatible with the now obsolete AM-WorkFlow
system.

Remarks
Use this function to format sequence numbers to a standard-length string for use in calculating document
or folder names.

Confidential and Proprietary © 2021 218                                                           www.accruent.com


FormatSequenceNum Function
Returns a number converted into a string and optionally prefixes zeros until the specified string length is
reached.

Syntax
FormatSequenceNum(Value As Long, [Length As Long = 0]) As String

Parameters

Name Description
Value The number to convert.
Length The total length of the string to create.

Remarks
Use this function to format sequence numbers to a standard-length string for use in calculating document
or folder names.

Confidential and Proprietary © 2021 219                                                           www.accruent.com


GMTTime2Local Function
Converts a date from Greenwich Mean Time (GMT) to the time zone of the local computer.

Syntax
GMTTime2Local(GMTTime As Date) As Date

Parameters

Name Description
GMTTime A date expressed in GMT.

Confidential and Proprietary © 2021 220                                                           www.accruent.com


ListFromColumn Function
Returns a one-dimensional array of table column data.

Syntax
ListFromColumn(Table, [ColumnIndex As Long = 0])

Parameters

Name Description
Table An object that represents the Meridian table from which to return data.
ColumnIndex Optional index number of the column from which to return data.

Confidential and Proprietary © 2021 221                                                           www.accruent.com


LocalTime2GMT Function
Converts a date from the local time zone to Greenwich Mean Time (GMT).

Syntax
LocalTime2GMT(LocalTime As Date) As Date

Parameters

Name Description
LocalTime A date expressed in the local time zone of the computer.

Confidential and Proprietary © 2021 222                                                           www.accruent.com


PnIDLink_GetAssetCoordinates Function
Recalculates the asset coordinate to another format.

Syntax
Function PnIDLink_GetAssetCoordinates (X As String, Y As String,
SheetSize and String) As String

Parameters

Name Description
X Absolute coordinate X (in drawing units) of the asset in the drawing.
Y Absolute coordinate Y (in drawing units) of the asset in the drawing.
SheetSize The value returned by the PnIDLink_GetSheetSize Function.

Return Value
Returns array of strings (X,Y).

Remarks
Called for every asset in the drawing before AMMGetCustomColumnValues.

Confidential and Proprietary © 2021 223                                                           www.accruent.com


PnIDLink_GetSheetSize Function
Returns the name of the sheet size for the current drawing.

Syntax
Function PnIDLink_GetSheetSize (BlockList As String) As String

Parameters

Name Description
BlockList An array of titleblock names in the drawing.

Remarks
This function is called once before PnIDLink_GetAssetCoordinates.

Confidential and Proprietary © 2021 224                                                           www.accruent.com


PnIDLink_IsMainDrawing Function
Returns a Boolean value indicating whether the Meridian functionality is enabled for the current drawing.

Syntax
Function PnIDLink_IsMainDrawing (Args As String) As Boolean

Parameters

Name Description
Args The local workspace or shared workspace path of the drawing.

Remarks
Called once when the drawing is opened in AutoCAD P&ID.

Confidential and Proprietary © 2021 225                                                           www.accruent.com


Quote Function
Returns a string enclosed in a specified quotation character.

Syntax
Quote(Value As String,[QuoteChar As String]) As String

Parameters

Name Description
Value The string to enclose.
QuoteChar The character to enclose the string.

Confidential and Proprietary © 2021 226                                                           www.accruent.com


ValidateFolderName Function
Replaces illegal characters in a file or folder name with a specified character.

Syntax
ValidateFolderName(Name As String, ReplacementChar As String) As
String

Parameters

Name Description
Name The file or folder name to validate.
ReplacementChar The character with which to replace illegal characters.

Remarks
Use this function to validate newly calculated file or folder names.

Confidential and Proprietary © 2021 227                                                           www.accruent.com


WinInputBox Function
Shows a modal dialog box to receive input from the user.

Syntax
WinInputBox (Prompt As String, [Title As String], [Default As String])
As String

Parameters

Name Description
Prompt Body text of the dialog.
Title Title bar text of the dialog.
Default Default input text of the dialog.

Remarks
Not available in PowerWeb. The Prompt text can be formatted, as described in Formatting Text With RTF
Codes. To detect if the user clicked the Cancel button, test the returned value for an empty string ("").

Confidential and Proprietary © 2021 228                                                           www.accruent.com


WinMsgBox Function
Shows a configurable dialog box containing a message to the user.

Syntax
WinMsgBox (Prompt As String, [Style As AS_MsgBoxStyle = AS_
ApplicationModal], [Title As String]) As AS_MsgBoxResult

Parameters

Name Description
Prompt Body text of the dialog.
Style Style of the dialog as one or more of the AS_MsgBoxStyle constants.
Title Title bar text of the dialog.

Remarks
Not available in PowerWeb. The Prompt text can be formatted as described in Formatting Text With RTF
Codes.

Confidential and Proprietary © 2021 229                                                           www.accruent.com


Creating Custom Functions
The Meridian implementation of VBScript supports custom functions. These functions can be used the
same as Visual Basic functions. This means you can define functions in the MeridianEvents code block and
use them either in event procedures or in configuration expressions. Your custom functions appear in the
(General) branch of the Events and Procedures list when editing the Events code block and in the (General)
branch of the Object Browser when editing configuration expressions. This makes it easy to write a
function once and to reuse it in multiple places. For more information about creating and using custom
functions, see the VBScript Language Reference web site.
Note:
Custom functions are not available in the Database Import Wizard.

Confidential and Proprietary © 2021 230                                                           www.accruent.com


Meridian Event Procedures
Meridian event procedures allow you to customize the way Meridian works by adding your own
functionality onto what Meridian already does. When a user executes certain commands in one of the
Meridian client applications, Meridian performs a sequence of actions. At various steps in the sequence,
Meridian declares that an action (event) is occurring to which VBScript can react. Meridian checks for the
definition of a specific VBScript procedure (event handler) that corresponds to each event. If the procedure
exists, Meridian executes it before proceeding on to the next step in the sequence. All VBScript event
procedures are stored in a code block in the vault separate from the code blocks for the configuration
expressions.
Event procedures are more powerful than configuration expressions. Each configuration expression is a
single statement to be evaluated. Event procedures can contain many statements and provide additional
advantages. Event procedures can:
l Use variables
l Use subroutines
l Change the values of properties
l Invoke the methods of objects, for example, Document.RevokeWorkflow
Note:
The order of the events may change slightly in new releases to accommodate new functionality or to
resolve problems and cannot be guaranteed. Test all customization that relies on event procedures with
each upgrade before deploying the customization for production use.

Confidential and Proprietary © 2021 231                                                           www.accruent.com


Names Of Events
The names and syntax of event procedures are predefined. You can edit only the body. A prototype of a
procedure looks like the following example:
Sub DocGenericEvent_AfterPrint(Batch)
'Add your code here
End Sub
The names of event procedures include the event category and the event name. In the example above, the
event category is DocGenericEvent and the event name is AfterPrint. With event procedure names
standardized this way, you can easily identify the purpose of each procedure. You can view all of the
Meridian event procedures with the Events and Procedures browser in the Meridian Enterprise Script
Editor.
Note:
For brevity and readability, some of the event names in this guide show an asterisk * in the position of
the procedure name that represents the event type. This means that there are separate Initialize,
Before, After, and Terminate event procedures for the event, but they are all described in the same topic.
For example, following are the event procedure names for the Print event:
l DocGenericEvent_InitializePrint
l DocGenericEvent_BeforePrint
l DocGenericEvent_AfterPrint
l DocGenericEvent_TerminatePrint
In this example, all four event procedures listed above are described in the DocGenericEvent_*Print
section.

Confidential and Proprietary © 2021 232                                                           www.accruent.com


Batch Events
All document events are batch events. The batch size depends on the number of documents the user has
selected when the event occurs. A single-document operation is a batch operation with size 1. For example,
if the user selects four documents and then uses the Start Change command, the event procedures will
execute on a batch of four documents. If the user has selected only a single document, only that document
is processed, but all batch events still occur in order.

Confidential and Proprietary © 2021 233                                                           www.accruent.com


Order Of Events
Most of the event procedures consist of four types for each event:
l Initialize — your code should use these types of event procedures to prepare for batch operations
l Before and After — your code should perform the following:
1. Check conditions for the individual documents
2. Change property values for the individual documents
3. Perform necessary actions on the individual documents
l Terminate — your code should invoke any necessary user interface procedures and release
resources. This is typically some overview of the result.
Within a single event, the event procedures are invoked in the above order. The Initialize and Terminate
procedures are invoked once each for the entire batch and for most of the events only the Vault object is
available. The Before and After procedures are invoked once for each object (document, folder, and so on)
affected by the event and during these events, the affected objects are available.
Note:
Your code should not assume that all of the event types will occur under all conditions. For example, if an
unexpected error occurs during an operation, the After or Terminate events might not occur.
The command a user executes may also involve more than one type of event. The following example lists
the NewDocument and CalculateFileName events and the order in which they occur when a new
document is created:
1. DocGenericEvent_InitializeNewDocument
2. DocGenericEvent_InitializeCalculateFileName
3. DocGenericEvent_BeforeNewDocument
4. DocGenericEvent_AfterNewDocument
5. DocGenericEvent_BeforeCalculateFileName
6. DocGenericEvent_AfterCalculateFileName
7. DocGenericEvent_TerminateCalculateFileName
8. DocGenericEvent_TerminateNewDocument
The preceding example is a relatively simple one in which all of the events are in the DocGenericEvent
category and only one document is involved. In the following example, events in the DocGenericEvent and
DocCopyMoveEvent categories occur in the order listed when a batch of documents (some of which might
have references) is copied:
1. Before the batch of documents is processed:
a. DocCopyMoveEvent_PrepareCopy
b. DocCopyMoveEvent_InitializeCopy
c. DocGenericEvent_InitializeNewDocument
d. DocGenericEvent_InitializeCalculateFileName

Confidential and Proprietary © 2021 234                                                           www.accruent.com


2. For each source document in the batch:
a. DocCopyMoveEvent_BeforeCopyWithReferences (if the source document has references)
b. DocCopyMoveEvent_BeforeCopy
c. DocCopyMoveEvent_AfterCopy
d. DocCopyMoveEvent_BeforeCopy (for each reference of the current source document)
e. DocCopyMoveEvent_AfterCopy (for each reference of the current source document)
f. DocCopyMoveEvent_AfterCopyWithReferences (if the source document has references)
3. For each destination document (copy made) in the batch:
a. DocGenericEvent_BeforeNewDocument
b. DocGenericEvent_AfterNewDocument
c. DocGenericEvent_BeforeCalculateFileName
d. DocGenericEvent_AfterCalculateFileName
4. After the batch of documents has been processed:
a. DocGenericEvent_TerminateCalculateFileName
b. DocGenericEvent_TerminateNewDocument
c. DocCopyMoveEvent_TerminateCopy
These same events occur when documents are moved, derived, or replaced but with the corresponding
events (DocCopyMoveEvent_InitializeMove, DocCopyMoveEvent_BeforeMove, and so on) instead of
DocCopyMoveEvent_InitializeCopy, DocCopyMoveEvent_BeforeCopy, and so on. The only difference is
that the source and destination documents are the same document.
The order of the events within each category for specific Meridian commands are listed in the concept topic
for each event category, Document Generic Events, for example.

Confidential and Proprietary © 2021 235                                                           www.accruent.com


Create and Edit Event Procedures
By default, a new vault has no custom event procedures. Only the built-in Meridian functionality will
execute when events occur. All custom procedures (other than event procedures) and functions are listed
in the General category and do not react directly to events. If you write a procedure or function that is to
be called from within one of the event procedures, it will be listed in the General category.
Many of the parameters of the Meridian event procedures are objects. You can view all of the Meridian
objects and their methods and properties with the Object Browser of the Meridian Enterprise Script Editor.
Some of the Meridian event procedures accept as parameters one or more predefined Meridian constants.
The available Meridian constants can also be found in the Object Browser in the Meridian Enterprise Script
Editor.
To create or edit an event procedure:
1. In Configurator, on the Edit menu, select Edit Events.
The Meridian Enterprise Script Editor appears showing the existing custom event procedures, if any.
2. From the Events and Procedures list, select the event that you want to create or edit.
If a custom event procedure already exists, the code pane is scrolled to show the procedure's
definition and the mouse cursor is moved to the first line of the procedure. If a custom event
procedure does not already exist, a prototype of the definition is added to the end of the existing
code and the mouse cursor is moved to the first line of the procedure.
3. Add or edit code for the procedure using the Object Browser and Events and Procedures list as
necessary.
4. Choose between two options:
l Click OK to keep your changes when you are finished editing.

l Click Cancel to abandon your changes.

5. On the Vault menu, select Save to save your changes to the vault where they are available to users
the next time they open the vault.

Confidential and Proprietary © 2021 236                                                           www.accruent.com


Limiting Events Generated By VBScript
The code that is executed in one event procedure can cause another event. In other words, one event can
cause a chain reaction of other events that can make it difficult to limit the effects of the original event
procedure. For example, the Document.MoveTo method can invoke the NewDocument events when the
document is created in the destination folder. You might not want that to happen.
You can limit which events are generated by certain event procedures and avoid an event procedure
intended for one purpose from being executed by actions for which it was not intended.
To limit the events generated by event procedures:
1. In Configurator, expand Environment and select Application Link Settings.
The settings for each link appear in property pages in the right pane.
2. Click the Application Integration tab.
The Application Integration settings page appears in the right pane.
3. Click the Edit button to modify the settings.
4. Locate the line that contains [ScriptEvents].
This section of the configuration controls the events that are generated by VBScript event
procedures. A number of settings are listed in this section that each control a group of events. Each
setting is described in the comments that precede it.
5. Read the comments for each setting and change the setting to Y (Yes) or N (No) to meet your needs.
6. Click OK.

Confidential and Proprietary © 2021 237                                                           www.accruent.com


Asset Management Events
Asset management events occur when users work with the commands provided by the Meridian
Enterprise Asset Management module.

AIMS_AddComment Event
Occurs after a user has added a comment to a document in Meridian Explorer.

Syntax
Function AIMS_AddComment (commentText As String, attachmentType As
String, numberOfComments As Long)

Parameters

Name Description
commentText The text of the comment.
attachmentType The type of file attached to the comment.
The possible values are:
0 – no attachment
1 – redline
2 – image
numberOfComments The total number of comments on the document.

Example
Function AIMS_AddComment(commentText, attachmentType,
numberOfComments)
Document.Log "A comment was added to " + Document.FileName +
vbNewLine + "Text: " + commentText
Select Case attachmentType
Case "Redline"
Document.Log "A redline markup was added to " +
Document.FileName
Case "File"
Document.Log "A file was attached to " + Document.FileName

End Select
End Function

Confidential and Proprietary © 2021 238                                                           www.accruent.com


AIMS_Attach_Intialize Event
Occurs after a user has invoked the Upload command in Meridian Explorer to upload a file but before the
document is created in the vault. This event can be used to get the source filename and the
URL parameters of the Meridian Explorer page. Its return values can be used to allow the upload to proceed
and to specify the destination folder and document type or to cancel the operation.
This event is required for the Upload command. The command must be enabled as described in
AccruentMeridian Enterprise Server Administrator's Guide.

Syntax
Function AIMS_Attach_Intialize (SourceFilename As String, QueryString
As Array) As Array

Parameters

Name Description
SourceFilename The original filename that is uploaded from the client.
QueryString An array of name-value pairs for the URL parameters of the Meridian Explorer page.

Returned array

Value Description
Result Boolean True if the event should succeed, False if it should fail. If the event should fail,
the upload is aborted and an error message should be returned as the second item in
the array and the following items should not be returned.
TargetPath The path of the target folder in the vault where the uploaded file should be stored.
DocumentType The internal name of the document type that should be assigned to the new
document.

Example
' Event handler for BC-Explorer Asset Management Module link
' Returns required input for the Upload function
Function AIMS_Attach_Intialize(sourceFileName, queryString)
Dim targetFolder
Dim docTypeName

' Determine the target folder for the uploaded document


Set targetFolder = Vault.RootFolder.GetSubFolder("Miscellaneous")
If Not User.HasPrivilege(AS_PRIVILEGE_DOCUMENT_CREATE,

Confidential and Proprietary © 2021 239                                                           www.accruent.com


targetFolder) Then
' Abort the upload
AIMS_Attach_Intialize = Array(False, "Upload is not allowed")
Exit Function
End If

' Determine the document type for the uploaded folder


docTypeName = "GenericDocument"
If (LCase(Right(sourceFileName, 4)) = ".dwg") Then
docTypeName = "Drawing"
End If

' Return an array with the target folder path and the document
type name
AIMS_Attach_Intialize = Array(True, targetFolder.Path,
docTypeName)
End Function

AIMS_Attach_Before Event
Occurs after a user has invoked the Upload command in Meridian Explorer to upload a file and the
document object has been created in the vault. It occurs before the document content has been imported,
its properties have been set, and the reference created. This event can be used to set the properties and
workflow state of the Document object. Its return values can be used to allow the operation to proceed or
to cancel the operation. This event is optional for the Upload command.

Syntax
Function AIMS_Attach_Before (SourceFilename As String, QueryString As
Array) As Array

Parameters

Name Description
SourceFilename The original filename that is uploaded from the client.
QueryString An array of name-value pairs for the URL parameters of the Meridian Explorer page.

Returned array

Value Description
Result Boolean True if the event should succeed, False if it should fail. If the event should fail, the
document creation is aborted and an error message should be returned as the second item
in the array.

Confidential and Proprietary © 2021 240                                                           www.accruent.com


Value Description
Message An error message to show the user why the operation has been aborted.

Example
' Event handler for BC-Explorer Asset Management Module link
' Invoked before the uploaded content is imported to the document
Function AIMS_Attach_Before(sourceFileName, queryString)
Dim viewID
Dim tagFilter
Dim tagnr

' You may retrieve values from the URL of the BC-Explorer Related
Documents page
viewID = AIMS_GetQueryStringValue(queryString, "VIEWID")
tagFilter = AIMS_GetQueryStringValue(queryString, "TAGFILTER")
tagnr = AIMS_GetQueryStringValue(queryString, "TAGNR")

If False Then
' You may abort the upload if required
AIMS_Attach_Before = Array(False, "Some reason to stop the
upload")
Exit Function
End If

AIMS_Attach_Before = Array(True, "")


End Function

' Extract the value from the name-value collection


Function AIMS_GetQueryStringValue(queryString, name
Dim index

For index = LBound(queryString, 1) To UBound(queryString, 1)


' Find the named value
If (UCase(Cstr(QueryString(index)(0))) = UCase(CStr(name)))
Then
' Return the value
AIMS_GetQueryStringValue = Cstr(QueryString(index)(1))
Exit Function
End If
Next

AIMS_GetQueryStringValue = ""
End Function

Confidential and Proprietary © 2021 241                                                           www.accruent.com


Remarks
The first source vault of the repository is used as the destination. If a document with the same name
already exists in the vault, a number will be appended to the name, for example, MyFile(1).

AIMS_Attach_After Event
Occurs after a user has invoked the Upload command in Meridian Explorer and:
l The document tag has been created in the vault
l Its content has been imported
l Its properties have been set
l The reference to the Meridian Explorer item as been created
l But before the transaction has been committed.
This event can be used to modify the Document object and to allow the operation to complete or to cancel
the operation. This event is optional for the Upload command.

Syntax
Function AIMS_Attach_After (SourceFilename As String, QueryString As
Array) As Array

Parameters

Name Description
SourceFilename The original filename that is uploaded from the client.
QueryString An array of name-value pairs for the URL parameters of the Meridian Explorer page.

Returned array

Value Description
Result Boolean True if the event should succeed, False if it should fail. If the event should fail, the
document creation is aborted and an error message should be returned as the second item
in the array.
Message An error message to show the user why the operation has been aborted.

Example
' Event handler for BC-Explorer Asset Management Module link
' Invoked after the uploaded content is imported to the document

Confidential and Proprietary © 2021 242                                                           www.accruent.com


Function AIMS_Attach_After(sourceFileName, queryString)
Dim viewID
Dim tagFilter
Dim tagnr

' You may retrieve values from the URL of the BC-Explorer Related
Documents page
viewID = AIMS_GetQueryStringValue(queryString, "VIEWID")
tagFilter = AIMS_GetQueryStringValue(queryString, "TAGFILTER")
tagnr = AIMS_GetQueryStringValue(queryString, "TAGNR")

' Create a reference to the asset


Dim doc
Dim criteria
criteria = Array(Array("TagInfo.TagNr", IC_OP_EQUALS, tagnr))
For Each doc In Vault.FindDocuments(, Array("TagObject"),
criteria, False)
Document.GetReferences("TagObjectReference",False).Add(doc.ID)
Next

If False Then
' You may abort the upload if required
AIMS_Attach_After = Array(False, "Some reason to stop the
upload")
Exit Function
End If

' Release the uploaded document


Call Document.ChangeWorkflowState(AS_WF_RELEASED, "", User.Name)
Document.Log User.Name + " uploaded '" + sourceFileName + "' to "
+ Document.Path

' Return a user message


AIMS_Attach_After = Array(True, "Upload completed")
End Function

' Extract the value from the name-value collection


Function AIMS_GetQueryStringValue(queryString, name
Dim index

For index = LBound(queryString, 1) To UBound(queryString, 1)


' Find the named value
If (UCase(Cstr(QueryString(index)(0))) = UCase(CStr(name)))
Then
' Return the value
AIMS_GetQueryStringValue = Cstr(QueryString(index)(1))
Exit Function
End If
Next

Confidential and Proprietary © 2021 243                                                           www.accruent.com


AIMS_GetQueryStringValue = ""
End Function

AIMS_DeleteComment Event
Occurs after a user has deleted a comment from a document in Meridian Explorer.

Syntax
Function AIMS_DeleteComment (commentText As String, attachmentType As
String, numberOfComments As Long)

Parameters

Name Description
commentText The text of the comment.
attachmentType The type of file attached to the comment.
The possible values are:
0 – no attachment
1 – redline
2 – image
numberOfComments The total number of comments on the document.

Example
Function AIMS_DeleteComment(commentText, attachmentType,
numberOfComments)
If numberOfComments = 0 Then
Document.Log "All comments have been removed from " +
Document.FileName + vbNewLine + "Text: " + commentText
Else
Document.Log "A comment was removed from " + Document.FileName
+ vbNewLine + "Text: " + commentText
End If
End Function

Confidential and Proprietary © 2021 244                                                           www.accruent.com


AIMS_CloseComment Event
Occurs after a user has closed a discussion on a document in Meridian Explorer.

Syntax
Function AIMS_CloseComment (commentText As String, attachmentType As
String, numberOfComments As Long)

Parameters

Name Description
commentText The text of the comment.
attachmentType The type of file attached to the comment.
The possible values are:
0 – no attachment
1 – redline
2 – image
numberOfComments The total number of comments on the document.

Example
Function AIMS_CloseComment(commentText, attachmentType,
numberOfComments)
Document.Log "A comment was closed for " + Document.FileName +
vbNewLine + "Text: " + commentText
End Function

AIMS_UpdateComment Event
Occurs after a user has updated a comment on a document in Meridian Explorer.

Syntax
Function AIMS_UpdateComment (commentText As String, attachmentType As
String, numberOfComments As Long)

Confidential and Proprietary © 2021 245                                                           www.accruent.com


Parameters

Name Description
commentText The text of the comment.
attachmentType The type of file attached to the comment.
The possible values are:
0 – no attachment
1 – redline
2 – image
numberOfComments The total number of comments on the document.

Example
Function AIMS_UpdateComment(commentText, attachmentType,
numberOfComments)
Document.Log "A comment was updated for " + Document.FileName +
vbNewLine + "Text: " + commentText

Select Case attachmentType


Case "Redline"
Document.Log "A redline markup was added to " +
Document.FileName
Case "File"
Document.Log "A file was attached to " + Document.FileName

End Select
End Function

ObjectsPage_IsVisible Event
Occurs before the Objects HTML page is shown in PowerWeb.

Syntax
ObjectsPage_IsVisible As Boolean

Remarks
The Objects HTML page is an alternative implementation of the default Objects page that is shown in the
Meridian Enterprise PowerUser. The HTML page has equivalent functionality that is not available in the
default page shown by the AssetManagementTags extension in PowerWeb. The HTML page is only for use
in PowerWeb and the AssetManagementTags extension should not be assigned to any document types.

Confidential and Proprietary © 2021 246                                                           www.accruent.com


Return False (default) to hide the property page.

Example
Function ObjectsPage_IsVisible()
ObjectsPage_IsVisible = True
End Function

WhereUsedPage_IsVisible Event
Occurs before the Where Used HTML page is shown in PowerWeb.

Syntax
WhereUsedPage_IsVisible As Boolean

Remarks
The Where Used HTML page is an alternative implementation of the default Where Used page that is
shown in the Meridian Enterprise PowerUser. The HTML page has equivalent functionality that is not
available in the default page shown by the AssetManagementWhereUsed extension in PowerWeb. The
HTML page is only for use in PowerWeb and the AssetManagementWhereUsed extension should not be
assigned to any document types.
Return False (default) to hide the property page.

Example
Function WhereUsedPage_IsVisible()
WhereUsedPage_IsVisible = True
End Function

Confidential and Proprietary © 2021 247                                                           www.accruent.com


Briefcase Events
All of the briefcase event procedures have Briefcase as one of the arguments. The Briefcase argument is an
object representing the current briefcase. This object has two properties:
l Path — The full path to the briefcase file. This property is read-only in all event procedures except
BrcEvent_BeforeCreate.
l TemplateName — The name of the briefcase template from which the briefcase was created. For
more information on briefcase templates, see the Accruent Meridian Enterprise Configuration Guide.

Briefcase Event Sequences


The events that occur for the briefcase commands are shown in the following lists in the sequence that they
occur.

Add to Briefcase event sequence


l BrcEvent_BeforeOpen
l BrcEvent_AfterOpen
l DocGenericEvent_PrepareCommand
l BrcEvent_BeforeInclude1
l BrcEvent_BeforeWriteProperty2
l BrcEvent_BeforeWriteFileProperty3
l BrcEvent_AfterInclude1
l BrcEvent_AfterCreateTransmittal4
l BrcEvent_MatchDocument1
l Transmittal_BeforeSelectRecipients4
l Transmittal_AfterSelectRecipients4
l BrcEvent_BeforeSend4
l BrcEvent_AfterSend4
l BrcEvent_BeforeClose
l Transmittal_BeforeUpdateTransmittalDB4
l Transmittal_AfterUpdateTransmittalDB4

Confidential and Proprietary © 2021 248                                                           www.accruent.com


Notes
1. Once for each document in the briefcase.
2. Once for each mapped property in the briefcase.
3. Once for each mapped property in submittal briefcases. Meridian Transmittal Management module
only.
4. Meridian Transmittal Management module only.

Create briefcase event sequence


l BrcEvent_BeforeCreate
l BrcEvent_BeforeOpen
l BrcEvent_AfterOpen
l BrcEvent_BeforeClose

Import from Briefcase event sequence


l BrcEvent_BeforeOpen
l BrcEvent_AfterOpen
l BrcEvent_MatchDocument1
l BrcEvent_BeforeImport1
l BrcEvent_AfterImport1
l BrcEvent_BeforeClose

Notes
1. Once for each document in the briefcase.

Unlock from Briefcase event sequence


l BrcEvent_Unlocked

Confidential and Proprietary © 2021 249                                                           www.accruent.com


BrcEvent_AfterCreateTransmittal Event
Occurs after a transmittal document has been created and the transmittal sheet has been generated.

Syntax
BrcEvent_AfterCreateTransmittal(Batch, Briefcase)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
Briefcase An object that represents the briefcase file.

Remarks
Not available in PowerWeb.

BrcEvent_AfterImport Event
Occurs after a document has been imported into the vault from a briefcase.

Syntax
BrcEvent_AfterImport(Batch, Briefcase, Action)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
Briefcase An object that represents the briefcase file.
Action A long integer that represents one or more AS_BRC_IMPORT_ACTION constants.

Remarks
Not available in PowerWeb.

Confidential and Proprietary © 2021 250                                                           www.accruent.com


BrcEvent_AfterInclude Event
Occurs when a document in the current batch has been added to the briefcase.

Syntax
BrcEvent_AfterInclude(Batch, Briefcase, CheckOut)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
Briefcase An object that represents the briefcase file.
CheckOut True when the user has selected to check the document out to the briefcase. Read-only.

Remarks
Not available in PowerWeb. If you change property values on the document in this event procedure, the
status of the document in the briefcase will be Properties Changed.

BrcEvent_AfterOpen Event
Occurs after a briefcase has been opened.

Syntax
BrcEvent_AfterOpen(Briefcase)

Parameters

Name Description
Briefcase An object that represents the briefcase file. Can be set by the event procedure.

Remarks
Not available in PowerWeb.

Confidential and Proprietary © 2021 251                                                           www.accruent.com


BrcEvent_AfterSend Event
Occurs after a briefcase has been sent by email.

Syntax
BrcEvent_AfterSend(Briefcase As Type)

Parameters

Name Description
Briefcase An object that represents the briefcase file. Can be set by the event procedure.

Remarks
Not available in PowerWeb.

BrcEvent_AfterReadProperty Event
Occurs when a value for a mapped property has been read from the briefcase and is about to be written to
the vault.

Syntax
BrcEvent_AfterReadProperty(Batch, Briefcase, PropertyName, Value)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
Briefcase An object that represents the briefcase file.
PropertyName A string that contains the name of the Meridian property being written. Read-only.
Value The value of the property being written. This value can be changed in the event
procedure. The changed value is then written to the vault.

Remarks
Not available in PowerWeb.

Confidential and Proprietary © 2021 252                                                           www.accruent.com


BrcEvent_BeforeClose Event
Occurs when a briefcase is about to be closed.

Syntax
BrcEvent_BeforeClose(Briefcase As Type)

Parameters

Name Description
Briefcase An object that represents the briefcase file. Can be set by the event procedure.

Remarks
Not available in PowerWeb.

BrcEvent_BeforeCreate Event
Occurs when the user clicks the Create Briefcase button. Its primary purpose is to allow the user to enter a
default name for the briefcase file.

Syntax
BrcEvent_BeforeCreate (Briefcase, Abort)

Parameters

Name Description
Briefcase An object that represents the briefcase file. Can be set by the event procedure.
Abort Setting this Boolean argument to True aborts the operation. The event will not occur.

Remarks
During this event, if the current object is a folder, the Folder object refers to that folder. If the current
object is a document, the Folder object refers to the parent folder.
When the value of Briefcase.Path is set in this procedure, the user is not prompted as usual to select a path
and name for the new briefcase. Also, the file extension in the Path property will determine the briefcase file
format. The format definition with the name that matches the file extension will be used regardless of the
Format setting of the template that is specified in the Briefcase.TemplateName property. Consequently,

Confidential and Proprietary © 2021 253                                                           www.accruent.com


there should only be one format defined for each potential archive file extension and the format definition
name should be the same as the file extension. For more information about defining briefcase formats and
templates, see the AccruentMeridian Enterprise Configuration Guide.
Not available in PowerWeb.

BrcEvent_BeforeImport Event
Occurs when a document is about to be imported into the vault from a briefcase.

Syntax
BrcEvent_BeforeImport(Batch, Briefcase, Action)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
Briefcase An object that represents the briefcase file.
Action A long integer that represents one or more AS_BRC_IMPORT_ACTION constants.

Remarks
Not available in PowerWeb.
The Action parameter can be changed in this event procedure and the action executed by Meridian will be
changed accordingly.
Note:
Use the object argument Batch.Argument("__$$RelatedVaultDocument") to relate an
incoming file from a briefcase to an existing vault document. For more information, see Object
Arguments.

BrcEvent_BeforeInclude Event
Occurs before each document in the current batch is added to the briefcase.

Syntax
BrcEvent_BeforeInclude(Batch, Briefcase, CheckOut)

Confidential and Proprietary © 2021 254                                                           www.accruent.com


Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
Briefcase An object that represents the briefcase file.
CheckOut True when the user has selected to check the document out to the briefcase. Read-only.

Remarks
Not available in PowerWeb. The value of CheckOut can be changed in this event procedure. If it is set to
False, the document will only be included in the briefcase (even if the user has selected to check it out). If it
is set to True, the document will be checked out to the briefcase.

BrcEvent_BeforeIncludeFile Event
Occurs when one or more files is about to be added to a briefcase.

Syntax
BrcEvent_BeforeIncludeFile(Batch, Briefcase, File, ReadOnly)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
Briefcase An object that represents the briefcase file.
File The file name about to be added to the briefcase.
ReadOnly Boolean value that indicates if the file is under change.

Remarks
Not available in PowerWeb.

Confidential and Proprietary © 2021 255                                                           www.accruent.com


BrcEvent_BeforeOpen Event
Occurs when a briefcase is about to be opened.

Syntax
BrcEvent_BeforeOpen(Briefcase, Abort)

Parameters

Name Description
Briefcase An object that represents the briefcase file. Can be set by the event procedure.
Abort Setting this Boolean argument to True aborts the operation. The event will not occur.

Remarks
Not available in PowerWeb.

BrcEvent_BeforeSend Event
Occurs when a briefcase is about to be sent by email.

Syntax
BrcEvent_BeforeSend(Briefcase, Abort)

Parameters

Name Description
Briefcase An object that represents the briefcase file. Can be set by the event procedure.
Abort Setting this Boolean argument to True aborts the operation. The event will not occur.

Remarks
Not available in PowerWeb.

Confidential and Proprietary © 2021 256                                                           www.accruent.com


BrcEvent_BeforeWriteFileProperty Event
Occurs during creation of a submittal before a file is added to the briefcase.

Syntax
BrcEvent_BeforeWriteFileProperty(Batch, Briefcase, File, PropertyName,
Value)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
Briefcase An object that represents the briefcase file.
File The file name about to be added to the briefcase.
PropertyName The property name to set with Value.
Value The value to set to PropertyName.

Remarks
Not available in PowerWeb. Use this method to modify the briefcase property values of documents as they
are added to the submittal.

BrcEvent_BeforeWriteProperty Event
Occurs when a value for a mapped property is about to be written to the briefcase.

Syntax
BrcEvent_BeforeWriteProperty(Batch, Briefcase, PropertyName, Value)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
Briefcase An object that represents the briefcase file.

Confidential and Proprietary © 2021 257                                                           www.accruent.com


Name Description
PropertyName A string containing the name of the Meridian property to be written. This parameter is
read-only.
Value The value of the property. The event procedure can change this parameter. The
changed value will then be written to the briefcase.

Remarks
Not available in PowerWeb.

BrcEvent_MatchDocument Event
Occurs after the Import from Briefcase dialog box is shown by the View Briefcase dialog box and occurs
for each file in the briefcase.

Syntax
BrcEvent_MatchDocument (Batch, Briefcase, DocumentID)

Parameters

Name Description
Batch An object that represents the files contained within the briefcase.
Briefcase An object that represents the briefcase file.
DocumentID ID of the vault document to match to the current briefcase record. If one is found, then
upon input it contains the ID. If a match could not be found using built-in Meridian logic,
then it is empty and the user-defined logic in the event handler can help find a match.

Remarks
Not available in PowerWeb.
Use this method to match vault documents to files within a briefcase for which the existing metadata is
insufficient. The current briefcase metadata record is available as a Briefcase.CurrentRecord property
object.
Note:
Implementing this event will delay the opening and refreshing of the briefcase dialog box.

Confidential and Proprietary © 2021 258                                                           www.accruent.com


Example
This example searches for vault documents with the same name as in the briefcase and that have a value of
Work in Progress for the property SYS.Rootbranch.
Sub BrcEvent_MatchDocument(Batch, Briefcase, DocumentID)
Dim strFileName 'The filename we are looking for
Dim objDocsFound 'Result of search
Dim arrFindCriteria

If Len (DocumentID) = 0 Then


strFileName = Briefcase.CurrentRecord.Filename
arrFindCriteria = Array(_
Array("SYS.Rootbranch", IC_OP_EQUALS, "Work in Progress"))
Set objDocsFound = Vault.FindDocuments(strFileName, Empty,_
arrFindCriteria, False)

If objDocsFound.Count > 0 Then


DocumentID = objDocsFound.Document(0).ID
End If
End If
End Sub

BrcEvent_Unlocked Event
Occurs after a document is unlocked from a briefcase.

Syntax
BrcEvent_Unlocked(Batch, Briefcase)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
Briefcase An object that represents the briefcase file.

Remarks
Not available in PowerWeb. This event occurs when a document is unlocked automatically (for example,
when a document is checked in or is deleted from a briefcase) and when a document is unlocked manually.
When the document is unlocked from a briefcase from within the PowerUserMeridian or the View
Briefcase dialog box, the Briefcase argument is NULL.

Confidential and Proprietary © 2021 259                                                           www.accruent.com


CAD Link Events
CAD link events allow you to customize the behavior of the links to the various applications that Meridian
supports. These events occur when the link commands are run from within the Meridian client applications
and when the link commands are run from within the linked applications.

CAD Link Event Sequences


The events that occur for the application link commands are shown in the following lists in the sequence
that they occur.

Synchronize properties from file event sequence


l DocCADLink_AfterReadMTBProperties
l DocGenericEvent_PrepareCommand
l DocCADLink_InitializeUpdateProperties
l DocCADLink_BeforeUpdateProperties
l DocCADLink_AfterReadProperty1
l DocCADLink_AfterUpdateProperties
l DocCADLink_TerminateUpdateProperties

Notes
1. Once for each property.

Synchronize properties to file event sequence


l DocCADLink_BeforeWriteMTBProperties
l DocCADLink_InitializeUpdateProperties
l DocCADLink_BeforeUpdateProperties
l DocCADLink_BeforeWriteProperty1
l DocCADLink_AfterUpdateProperties
l DocCADLink_TerminateUpdateProperties

Notes
1. Once for each property.

Confidential and Proprietary © 2021 260                                                           www.accruent.com


Synchronize references from file event sequence
l DocCADLink_InitializeUpdateReferences
l DocCADLink_BeforeUpdateReferences
l DocCADLink_AfterUpdateReferences
l DocCADLink_TerminateUpdateReferences

DocCADLink_AfterReadProperty Event
Occurs after a document property that is mapped to a title block attribute is read.

Syntax
DocCADLink_AfterReadProperty(Batch, PropertyName, Value)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
PropertyName A string that contains the property name that was read.
Value The property value that was read.

Remarks
This event also occurs after a title block is read during batch import by the Document Import tool. The
Document object is available during this event but is read-only.

DocCADLink_AfterReadMTBProperties Event
Occurs after a document property that is mapped to multiple title block attributes is read.

Syntax
DocCADLink_AfterReadMTBProperties (Batch, BCPropStorage)

Confidential and Proprietary © 2021 261                                                           www.accruent.com


Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
BCPropStorage An object that contains the property information that will be written. See
BCPropStorage Object for its available properties and methods.

Example
Sub DocCADLink_AfterReadMTBProperties(Batch, BCPropStorage)
Dim rowCollection
Dim allColDefs
Dim colDef
Dim row
Set allColDefs = BCPropStorage.GetColumnDefs(2)
Set rowCollection = BCPropStorage.Rows

For Each row in rowCollection


For Each colDef In allColDefs
If Not IsNull(row.Property(colDef.Name).Value) Then
WinMsgBox "AfterReadMTB_Layout: " & _
row.Property( "Layout").Value & vbCrLf & _
"Property: " & CStr(colDef.Name) & vbCrLf & _
"Value: " & CStr(row.Property(colDef.Name).Value)
End If
Next
Next
End Sub

DocCADLink_BeforeWriteProperty Event
Occurs before a document property that is mapped to a title block attribute is written.

Syntax
DocCADLink_BeforeWriteProperty(Batch, PropertyName, Value)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.

Confidential and Proprietary © 2021 262                                                           www.accruent.com


Name Description
PropertyName A string that contains the property name that will be written to.
Value The property value that will be written.

Remarks
The Document object is available during this event but is read-only.

DocCADLink_BeforeWriteMTBProperties Event
Occurs before a document property that is mapped to multiple title block attributes is written.

Syntax
DocCADLink_BeforeWriteMTBProperties (Batch, BCPropStorage)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
BCPropStorage An object that contains the property information that will be written. See
BCPropStorage Object for its available properties and methods.

Example
Sub DocCADLink_BeforeWriteMTBProperties(Batch, MTBProperties)
Document.Log "BeforeWriteMTBProperties -->"
Dim rowCollection, allColDefs, colDef, row

Set allColDefs = MTBProperties.GetColumnDefs(2)


Set rowCollection = MTBProperties.Rows

For Each row in rowCollection


For Each colDef In allColDefs
If Not row.Property(colDef.Name) Is Nothing Then
Dim rv: rv = "AfterReadMTB_Layout: " & _
row.Property("Layout").Value & vbCrLf & _
"Property: " & CStr(colDef.Name) & vbCrLf & _
"Value: " & CStr(row.Property(colDef.Name).Value)
Document.Log rv

Confidential and Proprietary © 2021 263                                                           www.accruent.com


End If
Next
Next
End Sub

DocCADLink_OnUpdateReference Event
Occurs when a specific reference to or from the selected documents is updated.

Syntax
DocCADLink_OnUpdateReference(Batch, RefFile, IsCreated, ToFile)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
RefFile A string that contains the name of the file that is referenced.
IsCreated True if the reference exists, False if the reference does not yet exist.
ToFile Set to True to update the reference information stored in the file, False to only update the
references in the vault.

DocCADLink_*UpdateProperties Events
Occurs when document properties that are mapped to title block attributes are synchronized.

Syntax
DocCADLink_*UpdateProperties(Batch, ToFile)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
ToFile Set to True to update the title block, False to only update the document properties.

Confidential and Proprietary © 2021 264                                                           www.accruent.com


DocCADLink_*UpdateReferences Events
Occur when references to and from the document are updated.

Syntax
DocCADLink_*UpdateReferences(Batch, ToFile)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
ToFile Set to True to update the reference information stored in the file, False to only update the
references in the vault.

Confidential and Proprietary © 2021 265                                                           www.accruent.com


Custom Command Events
Custom command events occur when a custom command is executed.

Custom command event sequence


The following events occur when a document is selected.
l <CommandName>_State
The _State event determines what commands are available in the menu ribbon.
l DocGenericEvent_OnProperties
The events that occur for custom commands are shown in the following list in the sequence that they
occur.
l DocGenericEvent_PrepareCommand
l <CommandName>_PreInitialize
l <CommandName>_Initialize
l <CommandName>_BeforeWizard
l <CommandName>_AfterWizard
l <CommandName>_PreExecute
l <CommandName>_Execute
l <CommandName>_PreTerminate
l <CommandName>_Terminate

<CommandName>_State Event
Occurs when the client application is calculating which custom commands should be available in the main
menu, ribbon, or context menu.

Syntax
<CommandName>_State(Mode)

Parameters

Name Description
Mode Long integer that represents one or more AS_CMD_MODE constants.

Confidential and Proprietary © 2021 266                                                           www.accruent.com


Remarks
Use this event to set the status of the menu item to a long integer that represents one or more AS_CMD_
STATE constants.

<CommandName>_Initialize Event
Occurs before the command is executed.

Syntax
<CommandName>_Initialize(Batch)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.

<CommandName>_BeforeWizard Event
Occurs before a wizard page is shown.

Syntax
<CommandName>_BeforeWizard(Batch)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.

<CommandName>_AfterWizard Event
Occurs after a wizard page is shown.

Syntax
<CommandName>_AfterWizard(Batch)

Confidential and Proprietary © 2021 267                                                           www.accruent.com


Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.

<CommandName>_Execute Event
Occurs when the command is executed.

Syntax
<CommandName>_Execute(Batch)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.

Remarks
Use this event to execute the main logic of the command.

<CommandName>_PreExecute Event
Occurs before the command has been executed. This event is used to add a confirmation page to the
command.

Syntax
<CommandName>_PreExecute(Batch)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.

Confidential and Proprietary © 2021 268                                                           www.accruent.com


Remarks
Refer to the AskConfirmation method documentation for the Batch object to learn how to create
confirmation pages. You can also see examples of this functionality in this Knowledgebase article.

<CommandName>_PreInitialize Event
Occurs before the command is initialized. This event is used to add a confirmation page to the command.

Syntax
<CommandName>_PreInitialize(Batch)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.

Remarks
Refer to the AskConfirmation method documentation for the Batch object to learn how to create
confirmation pages. You can also see examples of this functionality in this Knowledgebase article.

<CommandName>_PreTerminate Event
Occurs before the command is terminated. This event is used to add a confirmation page to the command.

Syntax
<CommandName>_PreTerminate(Batch)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.

Remarks
Refer to the AskConfirmation method documentation for the Batch object to learn how to create
confirmation pages. You can also see examples of this functionality in this Knowledgebase article.

Confidential and Proprietary © 2021 269                                                           www.accruent.com


<CommandName>_Terminate Event
Occurs after the command has executed.

Syntax
<CommandName>_Terminate(Batch)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.

Confidential and Proprietary © 2021 270                                                           www.accruent.com


Document Copy/Move Events
Some events occur when documents are moved or created as copied, derived, or replacement documents.

Document Copy/Move Event Sequences


The events that occur for the document copy and move commands are shown in the following lists in the
sequence that they occur.

Copy, Paste, Derive, Replace event sequence


l DocCopyMoveEvent_SelectTarget
l DocCopyMoveEvent_PrepareCopy 1
l DocCopyMoveEvent_PreInitializeCopy
l DocCopyMoveEvent_InitializeCopy 2
l DocCopyMoveEvent_InitializeDerive 3
l DocCopyMoveEvent_InitializeReplace 4
l DocGenericEvent_InitializeNewDocument
l DocGenericEvent_InitializeCalculateFileName
l DocCopyMoveEvent_PreBeforeCopyWithReferences
l DocCopyMoveEvent_BeforeCopyWithReferences 5
l DocCopyMoveEvent_PreBeforeCopy7
l DocCopyMoveEvent_BeforeCopy 2
l DocCopyMoveEvent_AfterCopy 2
l DocCopyMoveEvent_BeforeDerive 3
l DocCopyMoveEvent_AfterDerive 3
l DocCopyMoveEvent_BeforeReplace 4
l DocCopyMoveEvent_AfterReplace 4
l DocGenericEvent_BeforeNewDocument
l DocGenericEvent_OnProperties 6
l DocGenericEvent_AfterNewDocument
l DocCopyMoveEvent_AfterCopyWithReferences 5
l DocGenericEvent_TerminateCalculateFileName
l DocGenericEvent_TerminateNewDocument

Confidential and Proprietary © 2021 271                                                           www.accruent.com


l DocCopyMoveEvent_PreTerminateCopy
l DocCopyMoveEvent_TerminateCopy 2
l DocCopyMoveEvent_TerminateDerive 3
l DocCopyMoveEvent_TerminateReplace 4

Notes
1. Source document only.
2. Copy and Paste commands only.
3. Derive command only.
4. Replace command only.
5. Copy with References command and Derive with References commands only.
6. Except Paste command.
7. PreBeforeCopy is not called when executing Copy with References. Copy with References will call
PreBeforeCopyWithReferences.

Move event sequence


l DocCopyMoveEvent_InitializeMove
l DocGenericEvent_InitializeNewDocument
l DocGenericEvent_InitializeCalculateFileName
l DocCopyMoveEvent_BeforeMove
l DocCopyMoveEvent_AfterMove
l DocGenericEvent_BeforeNewDocument
l DocGenericEvent_OnProperties
l DocGenericEvent_AfterNewDocument
l DocGenericEvent_TerminateCalculateFileName
l DocGenericEvent_TerminateNewDocument
l DocCopyMoveEvent_TerminateMove

DocCopyMoveEvent_*AfterCopyWithReferences Event
Occurs after documents are copied with references.

Syntax
DocCopyMoveEvent_AfterCopyWithReferences(Batch, SourceDocument,
OldParentDocument, NewParentDocument)

Confidential and Proprietary © 2021 272                                                           www.accruent.com


Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
SourceDocument An object that represents the source document.
OldParentDocument An object that represents the parent document of the source documents.
NewParentDocument An object that represents the parent document of the copied documents.
TargetFolder An object that represents the destination folder.

DocCopyMoveEvent_*BeforeCopyWithReferences Event
Occurs before documents are copied with references.

Syntax
DocCopyMoveEvent_BeforeCopyWithReferences(Batch, OldParentDocument,
NewParentDocument, TargetFolder)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
OldParentDocument An object that represents the parent document of the source documents.
NewParentDocument An object that represents the parent document of the copied documents.
TargetFolder An object that represents the destination folder. This event can modify the
destination folder.

Remarks
When a project copy is made of an assembly, this event occurs for all documents in the assembly, even
those that are not copied but stay referenced. This can occur if the Default Duplicator Action option of the
document type is set to Reference the source instead of Reference the copies (which were made by the
command). You can confirm which documents were actually copied by checking the value of the
TargetFolder parameter, which will be empty for the documents that were not copied.

Confidential and Proprietary © 2021 273                                                           www.accruent.com


DocCopyMoveEvent_*Copy Events
Occurs when documents are copied or moved.

Syntax
DocCopyMoveEvent_*Copy(Batch, TargetFolder)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
TargetFolder An object that represents the destination folder.

DocCopyMoveEvent_*Derive Events
Occurs when documents are derived.

Syntax
DocCopyMoveEvent_*Derive(Batch, TargetFolder)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
TargetFolder An object that represents the destination folder.

DocCopyMoveEvent_*Move Events
Occurs when documents are moved.

Syntax
DocCopyMoveEvent_*Move(Batch, TargetFolder)

Confidential and Proprietary © 2021 274                                                           www.accruent.com


Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
TargetFolder An object that represents the destination folder.

DocCopyMoveEvent_PreBeforeCopyWithReferences
Occurs before the BeforeCopyWithReferences event. This event is used to add a confirmation page before
the Copy with References Wizard.

Syntax
DocCopyMoveEvent_PreBeforeCopyWithReferences(Batch, OldParentDocument,
NewParentDocument, TargetFolder)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
OldParentDocument An object that represents the parent document of the source documents.
NewParentDocument An object that represents the parent document of the copied documents.
TargetFolder An object that represents the destination folder. This event can modify the
destination folder.

Remarks
Refer to the AskConfirmation method documentation for the Batch object to learn how to create
confirmation pages. You can also see examples of this functionality in this Knowledgebase article.

DocCopyMoveEvent_PrepareCopy Event
Occurs before a batch of documents are copied by various Meridian commands, but unlike other
initialization events, it occurs for the current document in the batch.

Syntax
DocCopyMoveEvent_PrepareCopy (Batch, TargetFolder)

Confidential and Proprietary © 2021 275                                                           www.accruent.com


Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
TargetFolder An object that represents the destination folder. This event can modify the destination
folder.

Example
The following example demonstrates how to assign a project copy to a known project folder (retrieved
from a document property, for example) and how to suppress the Select Folder and Reference Explorer
(for reference selection if references exist) dialog boxes.
Sub DocCopyMoveEvent_PrepareCopy(Batch, TargetFolder)
If Not Document Is Nothing Then
If Client.ImportType = AS_IT_COPIED And Client.ImportDetails = AS_
ID_CREATEPROJCOPY Then
'Add your code for document objects
TargetFolder = "\Design\Projects\894" 'Or some property value
'Suppress folder selection dialog
Client.Confirmation(AS_CONFIRM_PROJECT_FOLDER) = False
'Suppress reference selection dialog
Client.Confirmation(AS_CONFIRM_SELECT_ASSEMBLY_ITEMS) = False
End If
ElseIf Not Folder Is Nothing Then
'Add your code for folder objects
End If
End Sub

DocCopyMoveEvent_*Replace Events
Occurs when documents are replaced.

Syntax
DocCopyMoveEvent_*Replace(Batch, TargetFolder)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
TargetFolder An object that represents the destination folder.

Confidential and Proprietary © 2021 276                                                           www.accruent.com


DocCopyMoveEvent_SelectTarget Event
Occurs when a document is copied by the Import Documents, Copy (simple), Derive, and Replace
commands. This event can be used to show the user a dialog box for folder, projects, or no dialog box.

Syntax
DocCopyMoveEvent_SelectTarget (Batch, TargetFolder, DialogToShow)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected. This event
occurs once for each document in the batch.
TargetFolder An object that represents the default destination folder. This event can set the
destination folder.
DialogToShow The type of dialog box to show for folder selection, one of the AS_SELECT_DIALOG_
TYPE constants.

Remarks
The Document object in this event is the source document. This event is equivalent to the AS_CONFIRM_
NO_SELECTPROJECTWIZARD constant. For the corresponding event for newly created documents, see
DocGenericEvent_SelectTarget event.

Confidential and Proprietary © 2021 277                                                           www.accruent.com


Document Generic Events
These are events that do not fall under any of the other document event categories.

Document Generic Event Sequences


The events that occur for the document generic commands are shown in the following lists in the sequence
that they occur.

Change Document Type event sequence


l DocGenericEvent_PrepareCommand
l DocGenericEvent_InitializeChangeDocumentType
l DocGenericEvent_BeforeChangeDocumentType
l DocGenericEvent_AfterChangeDocumentType
l DocGenericEvent_BeforeNewDocument
l DocGenericEvent_OnProperties
l DocGenericEvent_AfterNewDocument
l DocGenericEvent_TerminateChangeDocumentType

Delete event sequence


l DocGenericEvent_PrepareCommand
l DocGenericEvent_InitializeDelete
l DocGenericEvent_BeforeDelete
l DocGenericEvent_AfterDelete
l DocGenericEvent_TerminateDelete

Draft Print event sequence 1


l DocGenericEvent_PrepareCommand
l DocGenericEvent_InitializePrint
l DocGenericEvent_BeforePrint
l DocGenericEvent_AfterPrint
l DocGenericEvent_TerminatePrint

Confidential and Proprietary © 2021 278                                                           www.accruent.com


Issue New Filename event sequence
l DocGenericEvent_PrepareCommand
l DocGenericEvent_InitializeCalculateFileName
l DocGenericEvent_TerminateCalculateFileName

New Document event sequence4


l DocGenericEvent_BeforeSelectDocumentType
l DocGenericEvent_InitializeNewDocument3
l DocGenericEvent_InitializeCalculateFileName3
l DocGenericEvent_SelectTarget
l DocGenericEvent_BeforeNewDocument
l ProjectWorkflowEvent_PrepareBrowser5
l ProjectWorkflowEvent_InitializeExpandItem5
l ProjectWorkflowEvent_BeforeExpandItem5
l DocGenericEvent_DocumentFolderSelected5
l DocGenericEvent_OnProperties3
l ProjectWorkflowEvent_PrepareBrowser6
l ProjectWorkflowEvent_InitializeExpandItem6
l ProjectWorkflowEvent_BeforeExpandItem6
l DocGenericEvent_DocumentFolderSelected6
l DocGenericEvent_AfterNewDocument
l DocGenericEvent_BeforeCalculateFileName8
l DocGenericEvent_AfterCalculateFileName8
l DocGenericEvent_TerminateCalculateFileName3
l DocGenericEvent_TerminateNewDocument3

Open in Application event sequence2


l DocGenericEvent_PrepareCommand
l DocGenericEvent_InitializeOpenInApplication
l DocGenericEvent_BeforeOpenInApplication
l DocGenericEvent_AfterOpenInApplication

Confidential and Proprietary © 2021 279                                                           www.accruent.com


l DocGenericEvent_TerminateOpenInApplication

Prepare for Offline Work event sequence1


l DocGenericEvent_PrepareCommand
l DocGenericEvent_InitializePrepareForOffline
l DocGenericEvent_BeforePrepareForOffline
l DocGenericEvent_AfterPrepareForOffline
l DocGenericEvent_TerminatePrepareForOffline

Redline event sequence


l DocGenericEvent_PrepareCommand
l DocGenericEvent_BeforeEditRedlines1
l DocGenericEvent_AfterEditRedlines

Refresh Thumbnail event sequence1


l DocGenericEvent_PrepareCommand
l DocGenericEvent_InitializeUpdateThumbnail7
l DocGenericEvent_BeforeUpdateThumbnail
l DocGenericEvent_AfterUpdateThumbnail
l DocGenericEvent_TerminateUpdateThumbnail7

Rename event sequence


l DocGenericEvent_PrepareCommand
l DocGenericEvent_InitializeRename
l DocGenericEvent_BeforeRename
l DocGenericEvent_AfterRename
l DocGenericEvent_TerminateRename

Replace Content event sequence1


l DocGenericEvent_PrepareCommand
l DocGenericEvent_BeforeReplaceContent
l DocGenericEvent_AfterReplaceContent

Confidential and Proprietary © 2021 280                                                           www.accruent.com


Notes
1. Does not occur in PowerWeb.
2. Occurs in PowerWeb when documents are downloaded.
3. Does not occur when new documents are created by the Document Import tool in PowerUser.
4. Does not occur when new documents are created by the Database Import Wizard in Configurator.
5. Occurs only if Client.Confirmation (AS_CONFIRM_NO_SELECTPROJECTWIZARD) =
False and Document.ParentFolder is not a valid folder.
6. Occurs only if Client.Confirmation (AS_CONFIRM_NO_SELECTPROJECTWIZARD) =
True and Document.ParentFolder is not a valid folder.
7. Does not occur if the Refresh thumbnail button on the Document page is clicked.
8. Occurs only if an expression is configured for the Calculate file name option of the document type.

DocGenericEvent_AfterCreateReference Event
Occurs after a reference between documents has been manually created by a user.

Syntax
DocGenericEvent_AfterCreateReference(Batch, RefType, TargetDocument,
[RefDisplayName])

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
RefType Name of the reference type assigned to the reference.
TargetDocument Document object to which the reference was made.
RefDisplayName Name that was assigned to the reference. The value may be set as described in
DocGenericEvent_BeforeCreateReference event.

DocGenericEvent_AfterDeleteReference Event
Occurs after a reference between documents has been manually deleted by a user.

Syntax
DocGenericEvent_AfterDeleteReference(Batch, RefType, TargetDocument,
[RefDisplayName])

Confidential and Proprietary © 2021 281                                                           www.accruent.com


Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
RefType Name of the reference type assigned to the reference.
TargetDocument Document object to which the reference was made.
RefDisplayName Name that was assigned to the reference.

Remarks
If the Batch.Abort method was called in the DocGenericEvent_BeforeDeleteReference event from
PowerWeb, the reference was not be deleted.

DocGenericEvent_AfterEditRedlines Event
Occurs after documents are redlined by a user with the Meridian viewer.

Syntax
DocGenericEvent_AfterEditRedlines(Batch)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.

DocGenericEvent_AfterReplaceContent Event
Occurs after a user replaces the content of documents.

Syntax
DocGenericEvent_AfterReplaceContent(Batch, SourceFile)

Confidential and Proprietary © 2021 282                                                           www.accruent.com


Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
SourceFile A string containing the path and filename of the source file selected by the user to replace
the document's content.

DocGenericEvent_BeforeCreateReference Event
Occurs before a reference between documents is manually created by a user.

Syntax
DocGenericEvent_BeforeCreateReference(Batch, RefType, TargetDocument,
[RefDisplayName])

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
RefType Name of the reference type that will be assigned to the reference.
TargetDocument Document object to which the reference will be made.
RefDisplayName Default name that will be assigned to the reference. This parameter is not supplied in
all cases. The value may be set in this event procedure.

DocGenericEvent_BeforeDeleteReference Event
Occurs before a reference between documents is manually deleted by a user.

Syntax
DocGenericEvent_BeforeDeleteReference(Batch, RefType, TargetDocument,
[RefDisplayName])

Confidential and Proprietary © 2021 283                                                           www.accruent.com


Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
RefType Name of the reference type assigned to the reference.
TargetDocument Document object to which the reference was made.
RefDisplayName Name that was assigned to the reference.

Remarks
If the Batch.Abort method is called in this event from PowerWeb, the reference will not be deleted.

DocGenericEvent_BeforeEditRedlines Event
Occurs before documents are redlined by a user with the Meridian viewer.

Syntax
DocGenericEvent_BeforeEditRedlines(Batch)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.

DocGenericEvent_BeforeReplaceContent Event
Occurs before a user replaces the content of documents.

Syntax
DocGenericEvent_BeforeReplaceContent(Batch, SourceFile)

Confidential and Proprietary © 2021 284                                                           www.accruent.com


Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
SourceFile A string containing the path and filename of the source file selected by the user to replace
the document's content.

Remarks
Importing a document using drag and drop on a released document will create a new revision. Depending
on your organization's business process for this action, the document might need to be placed in different
workflow state, for example, for review before the new content can be released. We recommend that you
do that in this event. If this event handler is not customized, an Access is denied error will result and the
action will fail. If the document should remain in the released state after the import, this event handler
should still be implemented to place the document in a different workflow state and then the document
released in the DocGenericEvent_AfterNewDocument event handler.
By default, the redlines for the existing document content will be deleted when the content is replaced. If
the redlines should be retained (to check that changes to the document have been done properly, for
example), you can prevent the redlines from being deleted by setting the AS_CONFIRM_
CLEANREDLINESONREPLACECONTENT constant to False in this event. The default is True.

DocGenericEvent_BeforeSelectDocType Event
Outputs the list of available document types to show the user based on the type of operation being carried
out such as a new document or change the document type.

Syntax
DocGenericEvent_BeforeReplaceContent(Batch, DocTypesList)

Parameters

Name Description
Batch An object that represents the action the user has selected.
DocTypesList A semicolon-delimited list of available document types for the action being carried out.

Remarks
This functionality is only available in PowerWeb. On wizard pages, this event is fired once.

Confidential and Proprietary © 2021 285                                                           www.accruent.com


DocGenericEvent_*CalculateFilename Events
Occurs when the filename of a document is calculated by its document type.

Syntax
DocGenericEvent_*CalculateFilename(Batch)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.

DocGenericEvent_*ChangeDocumentType Events
Occurs when a user changes the document type of documents.

Syntax
DocGenericEvent_*ChangeDocumentType(Batch)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
NewType Passed only to the BeforeChangeDocumentType procedure because at that moment the
document type has not yet been changed.
OldType Passed only to the AfterChangeDocumentType procedure because the document type has
already been changed.

DocGenericEvent_*Delete Events
Occurs when documents or folders are deleted by a user.

Syntax
DocGenericEvent_*Delete(Batch)

Confidential and Proprietary © 2021 286                                                           www.accruent.com


Parameters

Name Description
Batch An object that represents the batch of objects the user has selected.

Remarks
When a user deletes a folder, the Document object is Nothing. When a user deletes a document, the
Document object is the document being deleted. When a user deletes a folder that contains one or more
documents, the events occur once for each document and then once for the parent folder.

Example
Sub DocGenericEvent_BeforeDelete(Batch)
If Not Document Is Nothing Then
Batch.PrintDetails "Before delete " + Document.FileName
ElseIf Not Folder Is Nothing Then
Batch.PrintDetails "Before delete " + Folder.Name
End If
End Sub

DocGenericEvent_DocumentFolderSelected Event
Occurs after the project folder selection dialog box has been shown to the user to select the destination
folder for a new project copy document. Also shown to select a master document folder when releasing
new project documents as new master documents.
The project folder selection dialog box can be controlled with the ProjectWorkflowEvent_PrepareBrowser,
ProjectWorkflowEvent_InitializeExpandItem, and ProjectWorkflowEvent_BeforeExpandItem event
procedures described in the Accruent Meridian Advanced Project Workflow Module Configuration Guide.

Syntax
DocGenericEvent_DocumentFolderSelected (Batch, SelectedFolder)

Parameters

Name Description
Batch An object that represents the batch of master documents the user has selected.
SelectedFolder The name of the folder selected by the user.

Confidential and Proprietary © 2021 287                                                           www.accruent.com


Remarks
If Client.Confirmation (AS_CONFIRM_NO_SELECTPROJECTWIZARD) is False after
the DocGenericEvent_BeforeNewDocument event and Document.ParentFolder is not a valid folder at the
time that the new document properties must be set, the folder selection dialog box is shown before the
DocGenericEvent_OnProperties event in order to set the destination folder.
If Client.Confirmation (AS_CONFIRM_NO_SELECTPROJECTWIZARD) is True after the
DocGenericEvent_OnProperties event and Document.ParentFolder is still not a valid folder, the folder
selection dialog box is shown before the DocGenericEvent_AfterNewDocument event.
The selected folder is set as the Folder object in the DocGenericEvent_OnProperties and
DocGenericEvent_AfterNewDocument events.

DocGenericEvent_*NewDocument Events
Occurs when documents are created by a user with any method (template, import, Application
Integration). Also when a document is moved to a different folder or changed to a different document type.

Syntax
DocGenericEvent_*NewDocument(Batch, Action, SourceFile, DocType,
DocTemplate)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
Action A long integer that represents one or more AS_IMPORTTYPE constants.
SourceFile A string that contains the name of the source file imported as the new document.
DocType An object that represents the document type selected by the user for the new
document.
DocTemplate A string that contains the name of the document template selected by the user.

Remarks
We recommend not setting any property values in the BeforeNewDocument event as this might cause the
document to be created in a temporary parent folder before it is moved to its final destination, which might
cause conflicts with existing documents.
The Before and After procedures are invoked when documents are imported with the Document Import
tool. The Initialize and Terminate procedures are not invoked by the Document Import tool and are
invoked only once per batch by the PowerWebImport Documents command. The FailCurrent and Abort
methods of the Batch object are also available; however, the BatchIndex property will always be 1.

Confidential and Proprietary © 2021 288                                                           www.accruent.com


When documents are imported using drag-and-drop, the source of the files cannot be determined by
Meridian so the value of the Client.ClientID property is AS_CID_POWERUSER regardless of the source of
the documents. For your script to know where the documents originated from to perform validation or
other processing, the users must use the file commands that are provided by the Meridian application
links.

Example
You can test the value of the $$ICIMP_PropInvalid batch argument to determine if property validation
failed while running the Document Import tool. If the validation failed, then you can prevent the import of
the failed document using code similar to the following example.
Sub DocGenericEvent_BeforeNewDocument(Batch, Action, SourceFile,
DocType, DocTemplate)
If CBool(Batch.Argument("$$ICIMP_PropInvalid")) = True Then
Batch.FailCurrent("Property validation failed")
End If
End Sub

Note:
Use the object argument Batch.Argument("__$$RelatedProjectCopy") to obtain the
project copy that is being released as a master document. It can be useful to calculate the location for the
master document location if it is being created for the first time.
Use the object argument Vault.Argument("__$$RelatedTransmittal") to relate a
transmittal to a new submittal. Use the object argument Vault.Argument("__
$$SubmittalSender") to relate a person to a new submittal.
For more information, see Object Arguments.

DocGenericEvent_OnProperties Event
Occurs when a user views or edits the property pages of a document or folder.

Syntax
DocGenericEvent_OnProperties(Command, Abort)

Parameters

Name Description
A long integer that represents one or more AS_PROP_CMD constants that
Command indicate which button the user clicked. The constants are described in the
following table.
Abort Set to True to abort the operation.

Confidential and Proprietary © 2021 289                                                           www.accruent.com


Remarks
This event occurs in the Meridian client applications when Command includes the constants indicated in
the following table.

AS_PROP_CMD
constants

Constant Action PowerWeb PowerUser


AS_PS_ The user started viewing the property page.
CMD_VIEW
AS_PS_ The user clicked Edit to start property page
CMD_EDIT (wizard) editing.
AS_PS_ The user clicked Next to apply changes to the current
CMD_ page.
APPLY1
AS_PS_ The user clicked Finish to apply changes to the last
CMD_FINISH page and stop property page (wizard) editing.
AS_PS_ The user clicked Cancel to discard changes and stop
CMD_ property page (wizard) editing.
CANCEL

Note:
This constant is represented in PowerUser only when the Finish button is clicked at the end of a wizard.
In PowerWeb, it is included every time the Next button is clicked for a wizard page. Property values may
not be set in PowerWeb if this constant is represented.
This event does not occur in PowerWeb when creating folders.
Use this event with much caution. In PowerUser, when Command includes AS_PS_CMD_VIEW, setting
Abort to True will prevent display of all property pages. Attempting to set property values at that time can
cause errors such as "The object is currently being edited by another session" and lost data.
We recommend that you not execute other actions, make modifications to the document content, invoke
anything that takes a relatively long time, or invoke any user interface functions during this event. Such
actions can have unexpected or unpredictable results.

DocGenericEvent_*OpenInApplication Events
Occurs when documents are opened by a user in their native application.

Syntax
DocGenericEvent_*OpenInApplication(Batch, AppName)

Confidential and Proprietary © 2021 290                                                           www.accruent.com


Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
AppName A string that contains the name of the application in which the documents will be opened.
This is the name of the application registered in Windows on the user's computer for the file
type of the documents.

DocGenericEvent_PrepareCommand Event
Occurs after a user selects a document command on the shortcut menu to act upon the selected
document.

Syntax
DocGenericEvent_PrepareCommand(Batch, CmdID)

Parameters

Name Description
Batch An object that represents the current batch of documents.
CmdID A string that identifies the internal name of the command. For the identifiers that may be
used, see Meridian Enterprise command identifiers.

Remarks
Not available in PowerWeb. This event is intended to be used to set the Batch.ProcessAsBatch property to
True before programmatically adding documents with the Batch.AddDocuments method to a batch in a
custom command's Initialize event.

DocGenericEvent_*PrepareForOffline Events
Occurs when a user prepares documents for offline mode operation.

Syntax
DocGenericEvent_*PrepareForOffline(Batch)

Confidential and Proprietary © 2021 291                                                           www.accruent.com


Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.

DocGenericEvent_*Print Events
Occurs when documents are printed by a user from Meridian with the viewer. For information on
configuring watermark printing with the Watermark properties, see the AccruentMeridian Enterprise
Configuration Guide.

Syntax
DocGenericEvent_*Print(Batch)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.

Remarks
The DocGenericEvent_AfterPrint event does not occur in PowerWeb.

DocGenericEvent_*Rename Events
Occurs when documents or folders are renamed by a user.

Syntax
DocGenericEvent_*Rename(Batch, NewName)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
NewName A string that contains the new name entered by a user.

Confidential and Proprietary © 2021 292                                                           www.accruent.com


DocGenericEvent_SelectTarget Event
Occurs when a new document is created by the Create New and Add Document commands. This event
can be used to show the user a dialog box for folder, projects, or no dialog box.

Syntax
DocCopyMoveEvent_SelectTarget (Batch, TargetFolder, DialogToShow)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected. This event
occurs once for each document in the batch.
TargetFolder An object that represents the destination folder. This event can set the destination
folder.
DialogToShow The type of dialog box to show for project selection, one of the AS_SELECT_DIALOG_
TYPE constants.

Remarks
The Document object in this event is the new document. This event is equivalent to the AS_CONFIRM_
NO_SELECTPROJECTWIZARD constant. For the corresponding event for copied documents, see
DocCopyMoveEvent_SelectTarget event.

DocGenericEvent_*UpdateThumbnail Events
Occurs when a user updates the thumbnail images of documents manually.

Syntax
DocGenericEvent_*UpdateThumbnail(Batch)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.

Confidential and Proprietary © 2021 293                                                           www.accruent.com


DraftPrint_SetWatermark Event
Occurs when documents are printed by a user from Meridian Explorer with the viewer. For information on
configuring watermark printing with the Watermark properties, the AccruentMeridian Enterprise Server
Administrator's Guide.

Syntax
DraftPrint_SetWatermark
The settings Enable draft print and Enable watermarks on draft print hardcopies must be set to True as
described in the AccruentMeridian Enterprise Server Administrator's Guide.

Confidential and Proprietary © 2021 294                                                           www.accruent.com


Document Hybrid Events
Document hybrid events allow you to extend custom functionality when hybrid parts are attached and
detached.

Hybrid parts event sequence


The events that occur for the document hybrid part commands are shown in the following list in the
sequence that they occur.
l DocGenericEvent_PrepareCommand
l DocHybridEvent_InitializeHybridParts
l DocHybridEvent_BeforeHybridPart
l DocHybridEvent_AfterHybridPart
l DocHybridEvent_TerminateHybridParts
l DocGenericEvent_*Rename events 1

Notes
1. Occurs in PowerWeb only when creating a new part.

DocHybridEvent_AfterHybridPart Event
Occurs after a hybrid document action is performed on a document.

Syntax
DocHybridEvent_AfterHybridPart(Batch, Action, PartName)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
Action A long integer that represents one or more AS_HYBRID_ACTION constants.
PartName Optional name for the hybrid part.

Confidential and Proprietary © 2021 295                                                           www.accruent.com


DocHybridEvent_BeforeHybridPart Event
Occurs before a hybrid document action is performed on a document.

Syntax
DocHybridEvent_BeforeHybridPart(Batch, Action, PartName)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
Action A long integer that represents one or more AS_HYBRID_ACTION constants.
PartName Optional name for the hybrid part.

DocHybridEvent_InitializeHybridParts Event
Occurs before hybrid document actions are performed on a batch of documents.

Syntax
DocHybridEvent_InitializeHybridParts(Batch, Action)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
Action A long integer that represents one or more AS_HYBRID_ACTION constants.

DocHybridEvent_BeforeConvert2Hybrid Event
Occurs before a normal document is converted into a hybrid document by the Convert to Hybrid
command.

Syntax
DocHybridEvent_BeforeConvert2Hybrid(Batch, TemplateName)

Confidential and Proprietary © 2021 296                                                           www.accruent.com


Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
TemplateName The name of the template selected by the user.

DocHybridEvent_AfterConvert2Hybrid Event
Occurs after a normal document has been converted into a hybrid document by the Convert to Hybrid
command.

Syntax
DocHybridEvent_AfterConvert2Hybrid(Batch, TemplateName)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
TemplateName The name of the template selected by the user.

Confidential and Proprietary © 2021 297                                                           www.accruent.com


Document Project Copy Events
Document project copy events occur when documents created as project copies are modified of using the
various Meridian Enterprise commands. Like other document events, these events also receive a Batch
object. For more information about the Batch object, see Batch Object.

Document Project Copy Event Sequences


The events that occur for the document project copy commands are shown in the following lists in the
sequence that they occur.

Create Project Copy event sequence


l DocCopyMoveEvent_PrepareCopy
l ProjectWorkflowEvent_PrepareBrowser
l ProjectWorkflowEvent_InitializeExpandItem
l ProjectWorkflowEvent_BeforeExpandItem
l DocCopyMoveEvent_InitializeCopy
l DocGenericEvent_InitializeNewDocument
l DocGenericEvent_InitializeCalculateFileName
l DocCopyMoveEvent_BeforeCopyWithReferences
l DocProjectCopyEvent_ProjectCopyExist
l DocCopyMoveEvent_BeforeCopy
l DocCopyMoveEvent_AfterCopy
l DocGenericEvent_BeforeNewDocument
l DocGenericEvent_OnProperties
l DocGenericEvent_AfterNewDocument
l DocCopyMoveEvent_AfterCopyWithReferences
l DocGenericEvent_TerminateCalculateFileName
l DocGenericEvent_TerminateNewDocument
l DocCopyMoveEvent_TerminateCopy

Confirm Merged with Master event sequence


l DocGenericEvent_PrepareCommand
l DocProjectCopyEvent_InitializeConfirmMerged
l DocProjectCopyEvent_BeforeConfirmMerged

Confidential and Proprietary © 2021 298                                                           www.accruent.com


l DocProjectCopyEvent_AfterConfirmMerged
l DocProjectCopyEvent_TerminateConfirmMerged

Confirm Superseded by Master event sequence


l DocGenericEvent_PrepareCommand
l DocProjectCopyEvent_InitializeConfirmSuperseded
l DocProjectCopyEvent_BeforeConfirmSuperseded
l DocProjectCopyEvent_AfterConfirmSuperseded
l DocProjectCopyEvent_TerminateConfirmSuperseded

Discard from Project event sequence


l DocGenericEvent_PrepareCommand
l DocProjectCopyEvent_InitializeDiscardFromProject
l DocProjectCopyEvent_BeforeDiscardFromProject
l DocProjectCopyEvent_AfterDiscardFromProject
l DocProjectCopyEvent_TerminateDiscardFromProject

Link to Master event sequence


l DocGenericEvent_PrepareCommand
l DocProjectCopyEvent_BeforeLinkToMaster
l DocProjectCopyEvent_AfterLinkToMaster

Release as Master Revision event sequence


l DocGenericEvent_PrepareCommand
l DocProjectCopyEvent_InitializeReleaseToMaster
l DocGenericEvent_BeforeNewDocument1
l DocGenericEvent_OnProperties1
l ProjectWorkflowEvent_PrepareBrowser1,2
l ProjectWorkflowEvent_InitializeExpandItem1,2
l ProjectWorkflowEvent_BeforeExpandItem1,2
l DocGenericEvent_DocumentFolderSelected1,2
l DocGenericEvent_AfterNewDocument1
l DocGenericEvent_BeforeCalculateFileName1, 3

Confidential and Proprietary © 2021 299                                                           www.accruent.com


l DocGenericEvent_AfterCalculateFileName1, 3
l DocProjectCopyEvent_BeforeReleaseToMaster
l DocProjectCopyEvent_BeforeMasterUpdate4
l DocProjectCopyEvent_AfterMasterUpdate4
l DocProjectCopyEvent_AfterReleaseToMaster
l DocProjectCopyEvent_TerminateReleaseToMaster

Notes
1. Occurs only if the master document does not yet exist.
2. Occurs only if a parent folder has not yet been specified.
3. Occurs only if an expression is configured for the Calculate file name option of the document type.
4. Occurs only if the project copy has been modified.

DocProjectCopyEvent_AfterLinkToMaster Event
Occurs when the user runs the Link to Master Document command.

Syntax
DocProjectCopyEvent_AfterLinkToMaster (Batch, MasterDoc)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
MasterDoc An object that represents the master document from which the selected document was
copied.

Remarks
The Document object is the project copy during this event.

Confidential and Proprietary © 2021 300                                                           www.accruent.com


DocProjectCopyEvent_AfterMasterUpdate Event
Occurs after a new revision of a master document is updated from a project copy.

Syntax
DocProjectCopyEvent_AfterMasterUpdate (Batch, ProjectCopyDoc)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
ProjectCopyDoc An object that represents the project copy document.

DocProjectCopyEvent_AfterTransferToNext Event
Occurs when the user runs the Transfer to Next command.

Syntax
DocProjectCopyEvent_AfterTransferToNext (Batch, MasterDoc)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
MasterDoc An object that represents the master document from which the selected document was
copied.

Remarks
The Document object is the project copy during this event.

Confidential and Proprietary © 2021 301                                                           www.accruent.com


DocProjectCopyEvent_AfterUnlinkFromMaster Event
Occurs when the user runs the Unlink from Master Document command.

Syntax
DocProjectCopyEvent_AfterUnlinkFromMaster (Batch, MasterDoc)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
MasterDoc An object that represents the master document from which the selected document was
copied.

Remarks
The Document object is the project copy during this event.

DocProjectCopyEvent_BeforeLinkToMaster Event
Occurs when the user runs the Link to Master Document command.

Syntax
DocProjectCopyEvent_BeforeLinkToMaster (Batch, MasterDoc)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
MasterDoc An object that represents the master document from which the selected document was
copied.

Remarks
The Document object is the project copy during this event.

Confidential and Proprietary © 2021 302                                                           www.accruent.com


DocProjectCopyEvent_BeforeMasterUpdate Event
Occurs before a new revision of a master document is updated from a project copy.

Syntax
DocProjectCopyEvent_BeforeMasterUpdate (Batch, ProjectCopyDoc)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
ProjectCopyDoc An object that represents the project copy document.

DocProjectCopyEvent_BeforeTransferToNext Event
Occurs when the user runs the Transfer to Next command.

Syntax
DocProjectCopyEvent_BeforeTransferToNext (Batch, MasterDoc)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
MasterDoc An object that represents the master document from which the selected document was
copied.

Remarks
The Document object is the project copy during this event.

Confidential and Proprietary © 2021 303                                                           www.accruent.com


DocProjectCopyEvent_BeforeUnlinkFromMaster Event
Occurs when the user runs the Unlink from Master Documentcommand.

Syntax
DocProjectCopyEvent_BeforeUnlinkFromMaster (Batch, MasterDoc)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
MasterDoc An object that represents the master document from which the selected document was
copied.

Remarks
The Document object is the project copy during this event.

DocProjectCopyEvent_*ConfirmMerged Events
Occur when the user runs the Confirm Merged with Master command.

Syntax
DocProjectCopyEvent_*ConfirmMerged (Batch, MasterDoc)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
MasterDoc An object that represents the master document from which the selected document was
copied. This parameter is passed only to the Before and After events.

Remarks
The Document object is the project copy during this event.

Confidential and Proprietary © 2021 304                                                           www.accruent.com


DocProjectCopyEvent_*ConfirmSuperseded Events
Occur when the user runs the Confirm Superseded by Master command.

Syntax
DocProjectCopyEvent_*ConfirmSuperseded (Batch)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
MasterDoc An object that represents the master document from which the selected document was
copied. This parameter is passed only to the Before and After events.

Remarks
The Document object is the project copy during this event.

DocProjectCopyEvent_*DiscardFromProject Events
Occur when a project copy is discarded from a project workflow.

Syntax
DocProjectCopyEvent_*DiscardFromProject (Batch)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.

Confidential and Proprietary © 2021 305                                                           www.accruent.com


DocProjectCopyEvent_ProjectCopyExist Event
Occurs when an attempt is made to create a project copy and another project copy already exists. The new
project copy is not made and an error message is shown to the user.

Syntax
DocProjectCopyEvent_ProjectCopyExist(Batch, ProjectCopy)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
ProjectCopy An object that represents the existing project copy document.

Remarks
The Document object is the source document during this event. Only changes made during this event are
saved. Changes made in prior events are discarded.

DocProjectCopyEvent_ValidateTargetFolder Event
Occurs when an attempt is made to create a project copy. The target folder can be evaluated by script and
the user prevented from proceeding. If the folder is not valid, the ErrorMessage is displayed.

Syntax
DocProjectCopyEvent_ProjectCopyExist(Batch, TargetFolder,
ErrorMessage)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
TargetFolder An object that represents the destination folder.
ErrorMessage An object that represents the error message to be displayed.

Confidential and Proprietary © 2021 306                                                           www.accruent.com


Remarks
This event is not supported when ActiveX compatibility mode is enabled. For more information, see the
Personal Preferences article in the Meridian Enterprise User's Guide.

Examples
Following are example implementations of this event.

1 Sub DocProjectCopyEvent_ValidateTargetFolder(Batch, TargetFolder,


ErrorMessage)
2 If InStr (TargetFolder.Name, "Project") = 0 Then
3     ErrorMessage = "You can create project copies only in projects."
4 End If
5 End Sub

Example that gets the project name.

1 Sub DocProjectCopyEvent_ValidateTargetFolder(Batch, TargetFolder,


ErrorMessage)
2 Dim sProjectName
3 If TargetFolder.IsProject Then sProjectName = TargetFolder.Name Else
sProjectName = TargetFolder.ParentProject.Name
4 If InStr (TargetFolder.Name, "Master") > 0 And Not
TargetFolder.ParentProject Is Nothing Then
5 ErrorMessage = ""
6 Else
7 ErrorMessage = "Please select the 'Masters' folder in " &
sProjectName & "."
8 End If
9 End Sub

If you want to check if the parent project is in a project workflow:

Confidential and Proprietary © 2021 307                                                           www.accruent.com


Sub DocProjectCopyEvent_ValidateTargetFolder(Batch, TargetFolder,
ErrorMessage) 
If TargetFolder.ParentProject.WorkFlowState = AS_PWF_RELEASED Then
If TargetFolder.ParentProject.WorkFlowState = AS_PWF_RELEASED Then
 ErrorMessage = "Please select another project; the current project
status is 'Closed'."
End If
End If
End Sub

DocProjectCopyEvent_*ReleaseToMaster Events
Occur when a project copy is released as a new revision of the master document from which it was copied.

Syntax
DocProjectCopyEvent_*ReleaseToMaster (Batch)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
MasterDoc An object that represents the master document from which the selected
document was copied. This parameter is passed only to the Before and After
events.
ProjectCopyChanged True if the project copy has been changed since it was copied from the master
document. This parameter is passed only to the Before and After events.

DocProjectCopyEvent_*RequireMerge Events
Occur when the user runs the Require Merge command.

Syntax
DocProjectCopyEvent_*RequireMerge(Batch, MasterDoc)

Confidential and Proprietary © 2021 308                                                           www.accruent.com


Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
MasterDoc An object that represents the master document from which the selected document was
copied. This parameter is passed only to the Before and After events.

Remarks
The Document object is the project copy during this event.

DocProjectCopyEvent_*UndoMakeObsolete Events
Occur when the user runs the Undo Make Obsolete command.

Syntax
DocProjectCopyEvent_*UndoMakeObsolete (Batch, MasterDoc)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
MasterDoc An object that represents the master document from which the selected document was
copied. This parameter is passed only to the Before and After events.

Remarks
The Document object is the project copy during this event.

Confidential and Proprietary © 2021 309                                                           www.accruent.com


Document Type Workflow Events
The events in the DocWorkflowEvent category allow you to customize the actions performed by the
workflows configured for document types.

Document Type Workflow Event Sequences


The events that occur for the document type workflow commands are shown in the following lists in the
sequence that they occur.

Change To-Do Person event sequence


l DocGenericEvent_PrepareCommand
l DocWorkflowEvent_InitializeChangeWFPerson
l DocWorkflowEvent_BeforeChangeWFPerson
l DocWorkflowEvent_AfterChangeWFPerson
l DocWorkflowEvent_TerminateChangeWFPerson

Change Workflow Manager event sequence


l DocGenericEvent_PrepareCommand
l DocWorkflowEvent_InitializeChangeWFManager
l DocWorkflowEvent_BeforeChangeWFManager
l DocWorkflowEvent_AfterChangeWFManager
l DocWorkflowEvent_TerminateChangeWFManager

Execute transition event sequence


l DocGenericEvent_PrepareCommand
l DocWorkflowEvent_InitializeChangeWFState
l DocWorkflowEvent_BeforeChangeWFState
l DocWorkflowEvent_AfterChangeWFState
l DocWorkflowEvent_TerminateChangeWFState

Confidential and Proprietary © 2021 310                                                           www.accruent.com


Revoke event sequence
l DocGenericEvent_PrepareCommand
l DocWorkflowEvent_PreInitializeRevokeWF
l DocWorkflowEvent_InitializeRevokeWF
l DocWorkflowEvent_PreBeforeRevokeWF
l DocWorkflowEvent_BeforeRevokeWF
l DocWorkflowEvent_AfterRevokeWF
l DocWorkflowEvent_PreTerminateRevokeWF
l DocWorkflowEvent_TerminateRevokeWF

DocWorkflowEvent_*ChangeWFManager Events
Occurs when the manager of a document type workflow is manually changed to a different user.

Syntax
DocWorkflowEvent_*ChangeWFManager(Batch, Person)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
Person An object that represents the user that is selected as the new workflow manager.

DocWorkflowEvent_*ChangeWFPerson Events
Occurs when the to-do person of a document type workflow is manually changed to a different user.

Syntax
DocWorkflowEvent_*ChangeWFPerson(Batch, Person, Comment)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.

Confidential and Proprietary © 2021 311                                                           www.accruent.com


Name Description
Person An object that represents the user that is selected as the new workflow manager.
Comment A string that contains the comment entered by the user that is assigning the to-do person.

DocWorkflowEvent_*ChangeWFState Events
Occurs when a document type workflow is routed to a different state.

Syntax
DocWorkflowEvent_*ChangeWFState(Batch, TargetState, Person, Comment)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
SourceState A long integer that represents one or more AS_WF_STATE constants. Passed only to the
Before and After events.
TargetState A long integer that represents one or more AS_WF_STATE constants.
Person An object that represents the user to whom the documents are being assigned.
Comment A string containing the comment entered by the user.

DocWorkflowEvent_*RevokeWF Events
Occurs when a document type workflow is revoked by a user.

Syntax
DocWorkflowEvent_*RevokeWF (Batch)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.

Confidential and Proprietary © 2021 312                                                           www.accruent.com


Remarks
The PreBeforeRevokeWF event is used to add a confirmation page before the revoke a document workflow
action.
The PreInitializeRevokeWF and PreTerminateRevokeWF events are used to add confirmation pages before
initializing the action and after terminating the action.
Refer to the AskConfirmation method documentation for the Batch object to learn how to create
confirmation pages. You can also see examples of this functionality in this Knowledgebase article.

AfterReplaceReleased Event
Occurs for a document after a document that replaced it has been released from a workflow.The released
document must have been made by the Replace Document command.

Syntax
AfterReplaceReleased (Batch, ReplacingDoc)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
ReplacingDoc An object that represents the document that is being released.

Remarks
This event occurs after all other events for the document. It can be used to perform such actions as:
l Sending email notification of the release of the replacement
l Flagging the replaced document for archiving
l Removing the replaced document from the Data Library repository
l Setting a custom status property value on the replaced document
l Moving the replaced document to another location

Confidential and Proprietary © 2021 313                                                           www.accruent.com


Document Working Copy Events
The document working copy events occur only if the Work Isolation Mode of the vault is enabled, and they
occur instead of the document type workflow events.

Document Working Copy Event Sequences


The events that occur for the document working copy commands are shown in the following lists in the
sequence that they occur.

Create Working Copy event sequence


l DocGenericEvent_PrepareCommand
l DocWorkingCopyEvent_BeforeCreateWC
l DocWorkingCopyEvent_AfterCreateWC
l DocWorkingCopyEvent_TerminateCreateWC
l DocGenericEvent_*OpenInApplication events1

Notes
1. In PowerWeb only if the Accruent Upload/Download Control option Open in application is enabled

Revoke Working Copy event sequence


l DocGenericEvent_PrepareCommand
l DocWorkingCopyEvent_InitializeRevokeWC
l DocWorkingCopyEvent_BeforeRevokeWC
l DocWorkingCopyEvent_AfterRevokeWC
l DocWorkingCopyEvent_TerminateRevokeWC

Submit Working Copy event sequence


l DocGenericEvent_PrepareCommand
l DocWorkingCopyEvent_InitializeSubmitWC
l DocWorkingCopyEvent_BeforeSubmitWC
l DocWorkingCopyEvent_AfterSubmitWC
l DocWorkingCopyEvent_TerminateSubmitWC

Confidential and Proprietary © 2021 314                                                           www.accruent.com


DocWorkingCopyEvent_*CreateWC Events
Occurs when a user creates working copies of documents.

Syntax
DocWorkingCopyEvent_*CreateWC(Batch)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.

DocWorkingCopyEvent_*RevokeWC Events
Occurs when a user revokes working copies of documents.

Syntax
DocWorkingCopyEvent_*RevokeWC(Batch)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.

DocWorkingCopyEvent_*SubmitWC Events
Occurs when a user submits working copies of documents.

Syntax
DocWorkingCopyEvent_*SubmitWC(Batch)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.

Confidential and Proprietary © 2021 315                                                           www.accruent.com


Folder Generic Events
The folder generic events allow you to implement custom functionality for folders, including folder types.
Some of the events that apply to folders also apply to documents.

Folder Generic Event Sequences


The events that occur for the folder generic commands are shown in the following lists in the sequence that
they occur.

Change Folder Type event sequence


l DocGenericEvent_PrepareCommand
l FolderGenericEvent_InitializeChangeFolderType
l FolderGenericEvent_BeforeChangeFolderType
l FolderGenericEvent_AfterChangeFolderType
l FolderGenericEvent_BeforeNewFolder
l FolderGenericEvent_AfterNewFolder
l FolderGenericEvent_TerminateChangeFolderType

Delete Folder event sequence


l DocGenericEvent_PrepareCommand
l DocGenericEvent_InitializeDelete
l DocGenericEvent_BeforeDelete
l DocGenericEvent_AfterDelete
l DocGenericEvent_TerminateDelete

New Folder event sequence


l FolderGenericEvent_BeforeNewFolder
l DocGenericEvent_OnProperties1
l FolderGenericEvent_AfterNewFolder
l DocGenericEvent_*Rename events2

Confidential and Proprietary © 2021 316                                                           www.accruent.com


Notes
1. Does not occur in PowerWeb.
2. Occurs in PowerWeb only when creating a new folder.

FolderGenericEvent_AfterNewFolder Event
Occurs after a user creates a new folder in the vault.

Syntax
FolderGenericEvent_AfterNewFolder(Batch, Action)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
Action Long integer that represents one or more AS_IMPORTTYPE constants.

FolderGenericEvent_BeforeNewFolder Event
Occurs before a user creates a new folder in the vault.

Syntax
FolderGenericEvent_BeforeNewFolder(Batch, Action)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
Action Long integer that represents one or more AS_IMPORTTYPE constants.

Confidential and Proprietary © 2021 317                                                           www.accruent.com


FolderGenericEvent_*ChangeFolder Events
Occurs when a user changes the folder type of an existing folder.

Syntax
FolderGenericEvent_*ChangeFolder(Batch)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
NewType A string that contains the name of the new folder type selected by the user. Passed only to
the BeforeChangeFolder event.
OldType A string that contains the name of the original folder type of the folder. Passed only to the
AfterChangeFolder event.

Confidential and Proprietary © 2021 318                                                           www.accruent.com


Package Events
The package events occur during the life cycle of export and import packages in Meridian Enterprise Server.

ExportPackage_ChangeState Event
Occurs when the status of an export package is changed by a user.

Syntax
ExportPackage_ChangeState(Package, PreviousState, User)

Parameters

Name Description
Package An object that represents the export package.
PreviousState The previous state of the export package represented by one of the AS_
EXPORTPACKAGE_STATUS_VALUES constants.
User The name of the user that changed the package status.

Remarks
This event is intended for use with the Vault.SendNotification method to alert appropriate users about
documents exported from a folder. Because that method requires a Document object context, pass it a
document object and not the package object.

Example
Sub ExportPackage_ChangeState(Package, PreviousState, User)
Dim doc
'GlobalID of a document related to the package
Set doc = Vault.GetDocument("{0F002100-998A-11E5-0000-
56598CDC4B23}")
doc.Log "The export package named " & package & " was changed from
the " & _
PreviousState & " state by " & User
Vault.SendNotification "PACKAGEMAIL", doc
End Sub

Confidential and Proprietary © 2021 319                                                           www.accruent.com


ImportPackage_AfterImportedFromPortal Event
Occurs after a document is imported from Meridian Portal.

Syntax
ImportPackage_AfterImportedFromPortal ()

ImportPackage_AfterReadProperties Event
Occurs after the properties are read for a document that was imported from an import package.

Syntax
ImportPackage_AfterReadProperties (Batch, Package)

Parameters

Name Description
Batch An object that represents the documents contained in the import package.
Package An object that represents the import package.

ImportPackage_ChangeState Event
Occurs when the status of an import package is changed by a user.

Syntax
ImportPackage_ChangeState(Package, PreviousState, User)

Parameters

Name Description
Package An object that represents the import package.
PreviousState The previous state of the import package represented by one of the AS_
IMPORTPACKAGE_STATUS_VALUES constants.
User The name of the user that changed the package status.

Confidential and Proprietary © 2021 320                                                           www.accruent.com


Remarks
This event is intended for use with the Vault.SendNotification method to alert appropriate users about
documents imported from a package. Because that method requires a Document object context, pass it a
document object and not the package object.

Example
Sub ImportPackage_ChangeState(Package, PreviousState, User)
Dim doc
'GlobalID of a document related to the package
Set doc = Vault.GetDocument("{0F002100-998A-11E5-0000-
56598CDC4B23}")
doc.Log "The import package named " & package & " was changed from
the " & _
PreviousState & " state by " & User
Vault.SendNotification "PACKAGEMAIL", doc
End Sub

Confidential and Proprietary © 2021 321                                                           www.accruent.com


Project Workflow Events
Project workflow events occur when a project workflow is active. Like other document events, these events
also receive a Batch object. For more information about the Batch object, see Batch Object.

Project Workflow Event Sequences


The events that occur for the project workflow commands are shown in the following lists in the sequence
that they occur.
Note:
The Execute Transition event sequence and the Reroute Project event sequence do not occur in
PowerWeb.

Execute Transition event sequence


l DocGenericEvent_PrepareCommand
l ProjectWorkflowEvent_InitializeExecuteTransition
l ProjectWorkflowEvent_InitializeWizard
l DocGenericEvent_OnProperties
l ProjectWorkflowEvent_TerminateWizard
l ProjectWorkflowEvent_BeforeExecuteTransition
l ProjectWorkflowEvent_AfterExecuteTransition
l ProjectWorkflowEvent_TerminateExecuteTransition

Reassign Managers event sequence


l DocGenericEvent_PrepareCommand
l ProjectWorkflowEvent_InitializeChangeWFManager
l ProjectWorkflowEvent_BeforeChangeWFManager
l ProjectWorkflowEvent_AfterChangeWFManager
l ProjectWorkflowEvent_TerminateChangeWFManager

Reroute Project event sequence


l DocGenericEvent_PrepareCommand
l ProjectWorkflowEvent_InitializeReroute
l ProjectWorkflowEvent_BeforeReroute

Confidential and Proprietary © 2021 322                                                           www.accruent.com


l ProjectWorkflowEvent_AfterReroute
l ProjectWorkflowEvent_TerminateReroute

ProjectWorkflowEvent_*ChangeManager Events
Occurs when a project copy is discarded from a project workflow.

Syntax
DocProjectCopyEvent_*DiscardFromProject (Batch)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
Manager An object that represents the user who is the manager of the workflow.
Comment A string containing the text typed by the user who is changing the workflow manager.

ProjectWorkflowEvent_*ExecuteTransition Events
Occurs when a project workflow transition is executed.

Syntax
ProjectWorkflowEvent_*ExecuteTransition (Batch, Transition, Manager,
Comment)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
Transition A WorkflowTransition object that represents the transition to run. For more information
about the WorkflowTransition object, see WorkflowTransition Object.
Manager An object that represents the user who is the manager of the workflow.
Comment A string containing the text typed by the user who is changing the workflow manager.

Confidential and Proprietary © 2021 323                                                           www.accruent.com


ProjectWorkflowEvent_*Reroute Events
Occurs when a project workflow is rerouted to a selected state.

Syntax
ProjectWorkflowEvent_*ExecuteTransition (Batch, Transition, Manager,
Comment)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
State A WorkflowState object that represents the transition to run. For more information about
the WorkflowState object, see WorkflowState Object.
Manager An object that represents the user who is the manager of the workflow.
Comment A string containing the text typed by the user who is changing the workflow manager.

ProjectWorkflowEvent_BeforeExpandItem Event
Occurs before the folder selection dialog box is shown to the user to select a destination folder for a project
copy. This event does not occur in PowerWeb.

Syntax
ProjectWorkflowEvent_InitializeExpandItem (SubItems)

Confidential and Proprietary © 2021 324                                                           www.accruent.com


Parameters

Name Description
SubItems A variant array with an item for each subfolder of the folder to be expanded. Each element is
a variant array with the following elements:
1. ID of the subfolder
2. Display name of the subfolder
3. Combination of AS_PRJITEM_FLAGS constants for the item.
The initial value is AS_PRJITEM_MODE_VISIBLE + AS_PRJITEM_MODE_EXPANDABLE +
AS_PRJITEM_MODE_SELECTABLE + AS_PRJITEM_MODE_NEWSUBFOLDERALLOWED.
4. Value of the first property returned in the ItemProperties list by
ProjectWorkflowEvent_InitializeExpandItem.
5. Value of the second property.
6. And so on.
Your implementation of this event should set the constants in the third element above to
meet your requirements.

Remarks
Not available in PowerWeb. This event and the ProjectWorkflowEvent_InitializeExpandItem and
ProjectWorkflowEvent_PrepareBrowser events can be used to restrict the destination project folder
selected by a user:
l The root folder to show
l Whether a subfolder is visible or not
l Whether a subfolder is selectable
l Whether a subfolder is expandable
After the event, all of the subfolders of the current folder are handled as indicated by the constants in the
updated SubItems array. If an item does not occur in the SubItems array, the AS_PRJITEM_MODE_NONE
constant is assumed.

Example
Following are example implementations of this event and the ProjectWorkflowEvent_InitializeExpandItem
event:
'Rules for this example:
'1. Only 2nd level folders can be selected
'2. A folder is shown only when it is open and the current user's name
is on the list of users
' stored in the CreatePCUsers property that are allowed to create a
project copy.
'3. Subfolders are not shown

Confidential and Proprietary © 2021 325                                                           www.accruent.com


Function ProjectWorkflowEvent_InitializeExpandItem(ItemProperties)
lLevel = UBound (Split (Folder.Path, "\"))

Select Case lLevel


Case 2
ItemProperties = Array ("ProjectControl.Open",
"ProjectControl.CreatePCUsers")
End Select
End Function

Function ProjectWorkflowEvent_BeforeExpandItem(SubItems)
lLevel = UBound (Split (Folder.Path, "\"))

Select Case lLevel


Case 0 'Root folders
For i = LBound (SubItems) To UBound (SubItems)
If Right (SubItems (1, i), 7) = "Projects" Then
SubItems (i)(2) = AS_PRJITEM_MODE_VISIBLE + AS_PRJITEM_MODE_
EXPANDABLE 'Show it
Else
SubItems (i)(2) = AS_PRJITEM_MODE_NONE 'Hide it
End If
Next
Case 1 'Work Units
For i = LBound (SubItems) To UBound (SubItems)
SubItems (i)(2) = AS_PRJITEM_MODE_VISIBLE + AS_PRJITEM_MODE_
EXPANDABLE
Next

Case 2 'Splits
For i = LBound (SubItems) To UBound (SubItems)

If SubItems (i)(3) And InStr (User.Name & ";", SubItems (i)


(4)) > 0 Then
'The split is available, the user can choose it
SubItems (i)(2) = AS_PRJITEM_MODE_VISIBLE + AS_PRJITEM_MODE_
SELECTABLE
Else
SubItems (i)(2) = AS_PRJITEM_MODE_NONE 'Hide it
End If
Next
Case Else
'Cannot happen since everything at level 2 is not selectable
End Select
End Function

Confidential and Proprietary © 2021 326                                                           www.accruent.com


ProjectWorkflowEvent_InitializeExpandItem Event
Occurs before the folder selection dialog is shown to the user to select a destination folder for a project
copy.

Syntax
ProjectWorkflowEvent_InitializeExpandItem (ItemProperties,
DialogTitle)

Parameters

Name Description
ItemProperties An array of fully qualified property names that should be set by your implementation
of the event. This array will specify property filters that are supplied to the
ProjectWorkflowEvent_BeforeExpandItem event.
DialogTitle A string containing the text to be used for the folder selection dialog title.

Remarks
Not available in PowerWeb. This event and the ProjectWorkflowEvent_BeforeExpandItem and
ProjectWorkflowEvent_PrepareBrowser events can be used to restrict the destination project folder
selected by a user.

ProjectWorkflowEvent_InitializeWizard Event
Occurs when a project workflow transition shows a property page wizard.

Syntax
ProjectWorkflowEvent_InitializeWizard (Batch, Transition)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
Transition A WorkflowTransition object that represents the transition that is showing the wizard. For
more information about the WorkflowTransition object, see WorkflowTransition Object.

Confidential and Proprietary © 2021 327                                                           www.accruent.com


ProjectWorkflowEvent_PrepareBrowser Event
Occurs before the folder selection dialog box is shown for the user to select a destination folder for a
project copy.

Syntax
ProjectWorkflowEvent_ PrepareBrowser(RootFolder, DialogTitle)

Parameters

Name Description
RootFolder The path of the folder to show as the root in the Select Folder dialog.
DialogTitle Custom title to show for the Select Folder dialog.

Remarks
This event and the ProjectWorkflowEvent_InitializeExpandItem and ProjectWorkflowEvent_
BeforeExpandItem events can be used to restrict the destination project folder selected by a user.
The folder selection dialog box can be shown for new non-project copy documents by setting
Client.Confirmation (AS_CONFIRM_NO_SELECTPROJECTWIZARD) = False in the
DocGenericEvent_BeforeNewDocument event. The selected folder can then be retrieved in the
DocGenericEvent_DocumentFolderSelected event described in DocGenericEvent_
DocumentFolderSelected event.
If the folder that was last selected by the user is a subfolder of the folder specified by RootFolder, it is
selected by default in the folder selection dialog box. Otherwise, the folder specified by RootFolder is
selected by default.
By default, when the project folder selection dialog box appears, the root of the vault is highlighted and can
be selected. To prevent users from clicking the OK button and selecting the root and to force them to select
or create a project folder, set the AS_CONFIRM_ROOT_SELECTION constant to False in this event. The
default value is True.
This event does not occur in PowerWeb.

Examples
The following example shows how to initialize the Select Folder dialog box with a preset root folder. The
user must then select a subfolder as the destination of the project copy.
Sub ProjectWorkflowEvent_PrepareBrowser(RootFolder, DialogTitle)
RootFolder = "\projects"
DialogTitle = "Select Project"
End Sub

Confidential and Proprietary © 2021 328                                                           www.accruent.com


The following example demonstrates how to assign a project copy to a known destination project folder
(retrieved from a document property, for example) and how to suppress the Select Folder and Reference
Explorer (for reference selection if references exist) dialog boxes. The DocCopyMoveEvent_PrepareCopy
event occurs before ProjectWorkflowEvent_PrepareBrowser and in this example, the browser is not
shown.
Sub DocCopyMoveEvent_PrepareCopy(Batch, TargetFolder)
If Not Document Is Nothing Then
If Client.ImportType = AS_IT_COPIED And _
Client.ImportDetails = AS_ID_CREATEPROJCOPY Then
'Add your code for document objects
TargetFolder = "\Design\Projects\894" 'Or some property value
'Suppress folder selection dialog
Client.Confirmation(AS_CONFIRM_PROJECT_FOLDER) = False
'Suppress reference selection dialog
Client.Confirmation(AS_CONFIRM_SELECT_ASSEMBLY_ITEMS) = False
End If
ElseIf Not Folder Is Nothing Then
'Add your code for folder objects
End If
End Sub

ProjectWorkflowEvent_TerminateWizard Event
Occurs when a project workflow transition shows a property page wizard.

Syntax
ProjectWorkflowEvent_TerminateWizard (Batch, Transition)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
Transition A WorkflowTransition object that represents the transition that is showing the wizard. For
more information about the WorkflowTransition object, see WorkflowTransition Object.

Remarks
Not available in PowerWeb.

Confidential and Proprietary © 2021 329                                                           www.accruent.com


Property Page Events
Property page events allow you to implement custom functionality for the following system-defined
property pages:
l Document — the default property page for every document
l ExportPackages — shows the Meridian Explorer export packages related to the document
l Folder — the default property page for every folder in the Explorer view
l ImportPackages — shows the Meridian Explorer import packages related to the document
l Objects — shows the asset tag objects related to the document
l Rendition — shows the properties in the BCRenditionPropertySet property set
l Retention — shows the properties in the AMRetentionControlPropertySet property set
l TitleBlocks — shows the values of title block attributes when multiple layouts exist in a drawing and
the Synchronize the title blocks in all layouts option is enabled as described in the Accruent
Meridian Enterprise Configuration Guide
l WhereUsed — shows the documents related to the current asset object

System Property Page Event Sequence


The events that occur for the system property pages are shown in the following list in the sequence that
they occur.
l <PageName>Page_IsVisible
l <PageName>Page_CanEdit
l <PageName>Page_CanApply(Context)

<PageName>Page_IsVisible Event
Occurs before one of the pages listed is shown in the Meridian client applications.

Syntax
<PageName>Page_IsVisible As Boolean

Remarks
Return False (default) to hide the property page.

Confidential and Proprietary © 2021 330                                                           www.accruent.com


Example
Function ExportPackagesPage_IsVisible()
If Not Document Is Nothing Then
'Add your code for document objects
ExportPackagesPage_IsVisible = True
ElseIf Not Folder Is Nothing Then
'Add your code for folder objects
End If
End Function

<PageName>Page_CanEdit Event
Controls whether the Edit button appears in the Meridian client applications for one of the pages listed
except for the Document, Folder, and Import Packages pages (not editable).

Syntax
<PageName>Page_CanEdit As Boolean

Remarks
Return False to prevent users from editing the property page. The name of the event for the Title Blocks
page is TitleBlocksPage_CanEdit (no spaces).

<PageName>Page_CanApply Event
Occurs when a user clicks Apply or Close in the Meridian client applications for one of the pages listed
except for the Document, Folder, and Import Packages pages (not editable). This event occurs once for
every changed property value.
If this event returns False, the corresponding grid cell on the Title Blocks property page is switched to edit
mode and will wait for the user to modify the current value.

Syntax
<PageName>Page_CanApply(Context) As Boolean

Parameters

Name Description
Context A one dimension array that contains the layout name, block name, property name, old value,
and new value as shown in the example. Read only.

Confidential and Proprietary © 2021 331                                                           www.accruent.com


Remarks
If you use this event for the Retention or Rendition property pages, you do not need to show your own
dialog box (WinMsgBox function) for validation errors. Instead, you can raise an error as in the following
example, and it will be shown by the property page accordingly.
err.Raise vbObjectError, "RetentionPage_CanApply", "Invalid value for
EXPIRATIONDATE"
You can also use this event to validate the property values that are mapped to attributes in the title blocks
in multiple layouts of a drawing. The name of the event for the Title Blocks page is TitleBlocksPage_
CanApply (no spaces). The DocGenericEvent_OnProperties event occurs after this event.

Example
Function TitleBlocksPage_CanApply(Context)
If Not Document Is Nothing Then
If IsArray(Context) Then
Dim s
s = "Layout = " + CStr(Context(0)) + ", "
s = s + "Block = " + CStr(Context(1)) + ", "
s = s + "Property = " + CStr(Context(2)) + ", "
s = s + "Old value = " + CStr(Context(3)) + ", "
s = s + "New value = " + CStr(Context(4))
If UCase(CStr(Context(4))) = LCase(CStr(Context(4))) Then
TitleBlocksPage_CanApply = True
s = s + ": VALID"
Else
TitleBlocksPage_CanApply = False
s = s + ": INVALID"
End If
WinMsgBox s
End If
End If
End Function

Confidential and Proprietary © 2021 332                                                           www.accruent.com


Publishing Events
Publishing events occur in Meridian Enterprise vaults when they are configured as the source or
destination document management system.

DocSync_Failed Event
Occurs for the source document after synchronization fails.

Syntax
Function DocSync_Failed()

Remarks
Use this event with the Enable separate options per document option and the Enable Meridian script
events option of a repository synchronization job to control synchronization per document.

DocSync_Options Event
Occurs for the source document before synchronization starts.

Syntax
Function DocSync_Options()

Remarks
Use this event with the Enable separate options per document option and the Enable Meridian script
events option of a repository synchronization job to control synchronization per document.

DocSync_Succeeded Event
Occurs for the source document after synchronization succeeds.

Syntax
Function DocSync_Succeeded()

Confidential and Proprietary © 2021 333                                                           www.accruent.com


Remarks
Use this event with the Enable separate options per document option and the Enable Meridian script
events option of a repository synchronization job to control synchronization per document.

PublisherDestinationEvent_AfterPublish Event
Occurs in the destination vault after publishing has ended.

Syntax
PublisherDestinationEvent_AfterPublish (sourceType, sourceAddress, _
sourceDocId, publishOptions)

Parameters

Parameter Description
sourceType The name of the source system link, for example, BC Meridian or Windows file
system.
sourceAddress The address of the source system, for example, DataStoreName@MachineName for
the AccruentMeridian Enterprise link.
sourceDocId The ID of document in the source system.
publishOptions The publishing options that were applied to the job. If the options were specified in
the source system client application, they are passed in this parameter. For
information about the publishing options supported by a specific system link, see the
system link description in the AccruentMeridian Enterprise Server Administrator's
Guide.
If rendering fails with any rendering module and another attempt is configured, this
parameter contains the text _RETRYRENDER_<ModuleName>_ . Your implementation
of this event can then perform other actions in response to the failure, such as notify a
system administrator, set a property value for easy document location, and so on.

Example
Public Sub PublisherDestinationEvent_AfterPublish(sourceType,
sourceAddress, _
sourceDocId, publishOptions)
Document.Log _
"Published: " & _
"From " & sourceType & " '" & sourceAddress & "'" & _
" document with ID '" & sourceDocId & "'" & _

Confidential and Proprietary © 2021 334                                                           www.accruent.com


" with options '" & publishOptions & "'"
End Sub

PublisherDestinationEvent_HotspotUpdated Event
Occurs in the destination vault after publishing has ended if the Hotspot Extraction option Publisher will
invoke Meridian script event when update succeeds is selected. For more information about this option,
see the Configure Hotspot Extraction Options article in the Meridian Enterprise Server Administrator's
Guide.

Syntax
PublisherDestinationEvent_HotspotsUpdated ()
CreateTags (Document.SaveToFile)

PublisherSourceEvent_BeforePublish Event
Occurs in the source vault before publishing starts.

Syntax
PublisherSourceEvent_BeforePublish (destType, destAddress, _
destDocId, destDocPath, destDocName, publishOptions)

Parameters

Parameter Description
destType The name of the destination system link, for example, BC Meridian or Windows file
system.
destAddress The address of the destination system as shown on the Destination page, for
example, DataStoreName@MachineName for the Meridian Enterprise system link.
destDocId The ID of the document in the destination system. Contains an empty value if the
document does not yet exist in the destination system.
destDocPath The path of the document in the destination system.
destDocName The name of the document in the destination system.
publishOptions The publishing options to apply to the job. If the options were specified in the source
system client application, they are passed in this parameter. For information about
the publishing options supported by a specific system link, see the system link
description in the AccruentMeridian Enterprise Server Administrator's Guide.

Confidential and Proprietary © 2021 335                                                           www.accruent.com


Return Value
An array of variants. The first element in the array is treated as a new value for DestDocID parameter.

Example
Function PublisherSourceEvent_BeforePublish (destType, destAddress, _
destDocId, destDocPath, destDocName, publishOptions)
Document.Log _
"Started publishing: " & _
"to " & destType & " '" & destAddress & "'" & _
" document with ID '" & destDocId & "'" & _
" with options '" & publishOptions & "'" & _
" and path '" & destDocPath & "' and name '" & destDocName & "'"
End Function
The Documentum system link supports storing the Documentum object ID in a property in Meridian
Enterprise. The value of this property can be returned to determine whether a new document or a new
document revision for an existing document must be created.
Following is an example of retrieving the property. The property can be set as described in
PublisherSourceEvent_AfterPublish event.
Function PublisherSourceEvent_BeforePublish(destType, destAddress, _
destDocId, destDocPath, destDocName, publishOptions)
' The event handler may return the document Id
' in order To override the location of the destination document.
' If the array Is returned, try To parse the first element
' To be used as the destination id.
PublisherSourceEvent_BeforePublish = Array(Document.DocumentumID)
End Function

PublisherSourceEvent_AfterPublish Event
Occurs in the source vault after publishing has ended.

Syntax
PublisherSourceEvent_AfterPublish (destType, destAddress, _
destDocId, publishOptions)

Confidential and Proprietary © 2021 336                                                           www.accruent.com


Parameters

Parameter Description
destType The name of the destination system link, for example, BC Meridian or Windows file
system.
destAddress The address of the destination system as shown on the Destination page, for
example, DataStoreName@MachineName for the AccruentMeridian Enterprise link.
destDocId The ID of document in the destination system. Contains an empty value if the
document does not yet exist in the destination system.
publishOptions The publishing options to apply to the job. If the options were specified in the source
system client application, they are passed in this parameter. For information about
the publishing options supported by a specific system link, see the system link
description in the AccruentMeridian Enterprise Server Administrator's Guide.
If rendering fails with any rendering module and another attempt is configured, this
parameter contains the text _RETRYRENDER_<ModuleName>_ . Your implementation
of this event can then perform other actions in response to the failure, such as to
notify a system administrator, set a property value for easy document location, and
so on.

Example
Public Sub PublisherSourceEvent_AfterPublish (destType, destAddress, _
destDocId, publishOptions)
Document.Log _
"Published: " & _
"to " & destType & " '" & destAddress & "'" & _
" document with ID '" & destDocId & "'" & _
" with options '" & publishOptions & "'"
End Sub
The Documentum system link supports storing the Documentum object ID in a property in Meridian
Enterprise. The value of this property can be returned to determine whether a new document or a new
document revision for an existing document must be created.
Following is an example of saving the object ID. The property can be retrieved as described in
PublisherSourceEvent_BeforePublish event.
Sub PublisherSourceEvent_AfterPublish(destType, destAddress, _
destDocId, publishOptions)
' Save the (Documentum) ID of the published document in the
property
' of the source document
Document.DocumentumID = destDocId
End Sub

Confidential and Proprietary © 2021 337                                                           www.accruent.com


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


l VaultEvent_ChangeScope

Change view event sequence


l VaultEvent_ChangeView

Close event sequence


l VaultEvent_Close
l VaultEvent_ChangeView

Open event sequence


l 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)

Confidential and Proprietary © 2021 338                                                           www.accruent.com


Parameters

Name Description
ScopeName A string that contains the name of an existing scope to set as the default for the user or
the name of a virtual scope that the procedure will create based on an existing scope. No
special characters except the underscore (_) that appear in the scope list shown to the
user (for example, a hyphen) will be returned in this property name (the user selected
scope). The procedure itself must parse and replace such characters.
Scope The scope object set for the user by the procedure. Its value is Nothing when the
procedure is first called. References to this object before it has been initialized by the
procedure will produce the error Cannot initialize user session.

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)

Confidential and Proprietary © 2021 339                                                           www.accruent.com


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)

Parameters

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.

Confidential and Proprietary © 2021 340                                                           www.accruent.com


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.

Confidential and Proprietary © 2021 341                                                           www.accruent.com


Workflow Definition Events
The events in this category occur when a workflow definition is active.

Workflow Event Sequences


The events that occur for the workflow definition commands are shown in the following lists in the
sequence that they occur.

Execute transition event sequence


l DocGenericEvent_PrepareCommand 1
l DocCWFEvent_PreInitializeExecuteTransition 2
l DocCWFEvent_InitializeExecuteTransition
l DocCWFEvent_InitializeWizard
l DocGenericEvent_OnProperties
l DocCWFEvent_TerminateWizard
l DocCWFEvent_PreBeforeExecuteTransition
l DocCWFEvent_BeforeExecuteTransition
l DocCWFEvent_BeforeNewRevision
l DocCWFEvent_AfterNewRevision
l DocCWFEvent_TerminateNewRevision
l DocCWFEvent_AfterExecuteTransition
l DocWorkflowEvent_AfterReplaceReleased
l DocCWFEvent_TerminateExecuteTransition

Notes
1. Occurs in PowerUser only.
2. Occurs in PowerWeb only.

Reassign Managers event sequence


l DocGenericEvent_PrepareCommand
l DocWorkflowEvent_InitializeChangeWFManager 1
l DocWorkflowEvent_BeforeChangeWFManager
l DocWorkflowEvent_AfterChangeWFManager
l DocWorkflowEvent_TerminateChangeWFManager 1

Confidential and Proprietary © 2021 342                                                           www.accruent.com


Notes
1. Occurs in PowerUser only.

Reroute event sequence


l DocGenericEvent_PrepareCommand
l DocCWFEvent_InitializeReroute
l DocCWFEvent_BeforeReroute
l DocCWFEvent_AfterReroute
l DocCWFEvent_TerminateReroute

DocCWFEvent_*ExecuteTransition Events
Occurs when a workflow definition transition is executed.

Syntax
DocCWFEvent_*ExecuteTransition(Batch, Transition, Person, Manager,
Comment)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
Transition A WorkflowTransition object that represents the transition to execute.
Person An object that represents the user who is executing the transition.
Manager An object that represents the user who is the manager of the workflow.
Comment A string containing the text entered by the user who is executing the transition.

Remarks
This set of events is intended to support user input to a batch process using the Batch.Confirmation
Method and its related methods and properties as follows:
l The user initiates a workflow transition on a batch of documents
l DocCWFEvent_PreInitializeExecuteTransition event is executed and any changes to the event
parameters are ignored. Not supported by PowerUser.
Any batch scope confirmations are shown at this time.

Confidential and Proprietary © 2021 343                                                           www.accruent.com


l DocCWFEvent_InitializeExecuteTransition is executed and any changes to the event parameters are
processed.
Any batch scope confirmation results can be queried in script.
l For each document in the batch:
o DocCWFEvent_PreBeforeExecuteTransition is executed and any changes to the event
parameters are ignored. Not supported by PowerUser.
Any document scope confirmations are shown at this time. The document name is visible to
the user.
o DocCWFEvent_BeforeExecuteTransition is executed and any changes to the event parameters
are processed.
Any document scope confirmation results can be queried in script.
o DocCWFEvent_AfterExecuteTransition is executed and any changes to the event parameters
are ignored.
o DocCWFEvent_TerminateExecuteTransition is executed and any changes to the event
parameters are ignored.

DocCWFEvent_*Wizard Events
Occurs when property pages are shown by a transition of the workflow.

Syntax
DocCWFEvent_*Wizard(Batch, Transition, Comment)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
Transition A WorkflowTransition object that represents the transition that is showing the property
pages.
Comment A string that represents the default comment to add to the comment log.

Confidential and Proprietary © 2021 344                                                           www.accruent.com


DocCWFEvent_*NewRevision Events
Occurs when a new revision is created by a transition of the workflow.

Syntax
DocCWFEvent_*NewRevision(Batch, Transition)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
Transition A WorkflowTransition object that represents the transition that is creating the new
revision.

DocCWFEvent_*Reroute Events
Occurs when a workflow is rerouted to a state other than a default destination state.

Syntax
DocCWFEvent_*Reroute(Batch, State, Person, Comment)

Parameters

Name Description
Batch An object that represents the batch of documents the user has selected.
State An object that represents the destination state.
Person An object that represents the user who is rerouting the documents.
Comment A string containing the text entered by the user who is rerouting the documents.

Confidential and Proprietary © 2021 345                                                           www.accruent.com


Meridian API Constants
The Meridian API provides many constants. A constant is a meaningful name that represents a number or a
string and never changes. You can use constants to query for and specify application states and options.
These constants can be used with their related methods (actions) and properties (data) to manipulate vault
objects and control application behavior. The Meridian constants are members of enumerations that are
each used for a specific purpose. You can view the constants that are contained in each enumeration with
the Object Browser of the Meridian Enterprise Script Editor. The tooltip text of each constant gives a brief
description of the constant.
The following table describes each Meridian constant enumeration.

Meridian API constant enumerations

Enumeration Description
AS_BRC_IMPORT_ Briefcase import actions
ACTION
AS_CALLREMOTE_ Remote procedure call types
FLAGSS
AS_CE_RULE Enumerations of behaviors that you can specify for a project copy:
l AS_CER_DEFAULT – default behavior

l AS_CER_MERGE_WF – current behavior

l AS_CER_NOT_ALLOWED – allow only one project copy

l AS_CER_SERIAL_WITH_RELEASE – allow multiple project copies

l AS_CER_SERIAL_WITH_TRANSFER – reserved for future use

AS_CI Table column information index


AS_CLIENTID Meridian client IDs
AS_CMD_MODE Custom command modes
AS_CMD_STATE Custom command visibility states
AS_CONFIRM_ACTION Confirmation prompt toggles
AS_FEATURES Advanced and module features supported by the vault.
AS_GROUP_ Meridian group information column sets
COLUMNS

Confidential and Proprietary © 2021 346                                                           www.accruent.com


Enumeration Description
AS_HOTSPOTS_TYPE Enumerations that you can use to specify whether a method is carried out for a
particular type of hotspot on a document:
l AS_HOTSPOTS_AUTOMATIC – automatically generated hotspots

l AS_HOTSPOTS_MANUAL – manually created hotspots

AS_HYBRID_ACTION Hybrid document part actions


AS_IMPORTDETAILS Document import details
AS_IMPORTTYPE Document import actions
AS_LOGFLAGS Event logging parameters
AS_MAPIMSG_RECIP_ MAPI message recipient types
TYPE
AS_MAPIMSG_SEND_ MAPI message initiation types
FLAGS
AS_MOVE_OPTIONS Document move options
AS_MsgBoxResult Message box result codes
AS_MsgBoxStyle Message box style options
AS_NEWFOLDER_ Folder creation options
OPTIONS
AS_PCLOCK Project copy lock types
AS_PRIVILEGES Security privileges
AS_PROJITEM_FLAGS Project selection dialog configuration options
AS_PROP_CMD Property page commands
AS_PWF_STATUS Project folder workflow status
AS_REFRESHFLAG Client refresh options
AS_SUBMITTAL_ Submittal states. Used by Meridian Transmittal Management Module.
STATUS_FLAGS
AS_SUBMITTAL_ Current submittal status. Used by Meridian Transmittal Management Module.
STATUS_VALUES
AS_TQTYPE External data table or query types
AS_TRANSMITTAL_ Transmittal states. Used by Meridian Transmittal Management Module.
STATUS_FLAGS

Confidential and Proprietary © 2021 347                                                           www.accruent.com


Enumeration Description
AS_TRANSMITTAL_ Current Transmittal status. Used by Meridian Transmittal Management
STATUS_VALUES Module.
AS_URL_FLAGS PowerWeb URL formats
AS_USER_COLUMNS Meridian user information column sets
AS_WA_STATEFLAG Work area statuses
AS_WATERMARK_ Watermark colors
COLORS
AS_WATERMARK_ Watermark annotation style options
STYLES
AS_WATERMARK_ Watermark title style options
TITLE_STYLES
AS_WF_STATE Workflow definition current status
AS_WFINTERLOCK_ Workflow definition interlock level
LOCATION
AS_WORKFLOW_ Workflow definition state types
STATE_TYPE
AS_WORKFLOW_ Expected result of executing a transition
TRANS_RES
IC_OPERATOR Search criteria operators
IC_SHOWWINDOW Shell command window options

Confidential and Proprietary © 2021 348                                                           www.accruent.com


VBScript Examples
The following topics describe how to use VBScript to automate common tasks. You can use these examples
in your own vault configuration. For expert assistance with VBScript customization, contact the Accruent
Professional Services department or a Solution Partner.

Validating unique property values


Nearly every vault has at least one property that must only contain unique values. That is, the value should
not be duplicated anywhere in the vault, for example, document names or numbers. Just like Windows,
Meridian prevents duplicate document names in the same folder, but to prevent duplicates in an entire
vault requires a VBScript validation expression.
The IsUniqueValue method of the Document object queries the vault for a given value in a given property.
You can use this method in an expression for the This expression must Be True option on the Validation
page of a custom property:
Document.IsUniqueValue (Document.MyProperty, Value)

Clearing the property values of copied documents


When documents are copied, their property values are copied as well. This may be undesirable for some
properties that you want the user to enter or that should be unique. To accomplish this, you need VBScript
to react and clear the properties when documents are copied. A custom event procedure for the
DocGenericEvent_BeforeNewDocument event is the ideal solution. This event occurs just before
document copies are created, when you can set the property values that will be saved for the copies. If the
properties are not used for all document types in the same vault, you can use a conditional statement to
take the appropriate action for each document type as in the following example.
Sub DocGenericEvent_BeforeNewDocument(Batch, Action, SourceFile,
DocType, DocTemplate)
If Document.DocumentType.InternalName = "QualityDocument" Then
Document.Category = "Quality Documents"
Document.LastAuditBy = vbNullString
Document.LastAuditOn = Null
Document.AuditResult = vbNullString
Document.AuditorNotes = vbNullString
Document.NextAuditBy = vbNullString
Document.NextAuditOn = Null
Document.AuditHistory = vbNullString
Document.Author = vbNullString
Document.ApprovedBy = vbNullString
Document.ApprovedOn = Null
Document.Comments = vbNullString
Else If Document.DocumentType.InternalName = "NonConformance" Then
Document.Category = "Non Conformances"

Confidential and Proprietary © 2021 349                                                           www.accruent.com


End If
End Sub

Note:
Date properties do not accept string values. Therefore, instead of setting them to vbNullString, set them
to Null.

Setting property values based on workflow transitions


It can be convenient for some property values to be set automatically at specific transitions in a
document's workflow. This can be done by determining the state to which a document is being routed and
setting property values accordingly. Meridian provides many constants that you can use, including the AS_
WF_STATE enumeration used in the following example.
Sub DocWorkflowEvent_AfterChangeWFState(Batch, SourceState,
TargetState, Person, Comment)
If TargetState = AS_WF_APPROVED Then
Document.ApprovedOn = vbDate
Document.ApprovedBy = User.FullName
End If
If TargetState = AS_WF_UNDERCHANGE Then
Document.ApprovedOn = Null
Document.ApprovedBy = ""
End If
End Sub

Sending email messages


Automatically generating email messages is useful for many purposes, particularly during customized event
procedures. The following example code shows a typical procedure for setting properties of a
NewMailMessage object. It uses constants in the AS_MAPIMSG_RECIP_TYPE and AS_MAPIMSG_SEND_
FLAGS enumerations to set various properties of the message before sending it.
Sub SendEmailMessage()
Dim oMessage
Set oMessage = Client.NewMailMessage

'Recipients
oMessage.Recipients.Add "",AS_MMRT_
TO,"<recipient.name@anotherdomain.com>"
oMessage.Recipients.Add "",AS_MMRT_
CC,"<recipient.name@anotherdomain.com>"

'Sender
oMessage.Originator.Address = "<sender.name@mydomain.com>"
oMessage.Originator.Name = "Sender's Name"
oMessage.Originator.Type = AS_MMRT_ORIG

Confidential and Proprietary © 2021 350                                                           www.accruent.com


'Subject
oMessage.Subject = "The subject of the message"

'Body text
oMessage.NoteText = "The body text of the message"

'Attachments
oMessage.Attachments.Add "c:\temp\my.bmp", ""

'Send it with MAPI options and reset when done


oMessage.Send AS_MMSF_LOGON_UI
oMessage.Clean
End Sub

Confidential and Proprietary © 2021 351                                                           www.accruent.com


Automation Objects
Automation objects are special objects that applications (called automation servers) make available to
other applications. The objects make it possible for functionality or data within one application to be used
inside the other application, for example, a spreadsheet within a word processing document. This is
convenient for application users because they do not need to leave one application in order to use the
other application.
Automation servers provide at least one type of object. For example, a word processing application might
provide an application object, a document object, and a toolbar object. Automation objects can be created
with the Windows client applications of Meridian with VBScript. To create an automation object, assign the
object returned by CreateObject to an object variable as in the following example:
Dim ExcelSheet
Set ExcelSheet = CreateObject("Excel.Sheet")
This code starts the application and creates the object (in this example, a Microsoft Excel worksheet). After
an object is created, refer to it in your code using the object variable you defined. As shown in the following
example, you can access properties and methods of the new object using the object variable created
above, ExcelSheet, and other Excel objects, including the Application object and the ActiveSheet.Cells
collection:
' Make Excel visible through the Application object.
ExcelSheet.Application.Visible = True
' Place some text in the first cell of the sheet.
ExcelSheet.ActiveSheet.Cells(1,1).Value = "This is column A, row 1"
' Save the sheet.
ExcelSheet.SaveAs "C:\DOCS\TEST.XLS"
' Close Excel with the Quit method of the Application object.
ExcelSheet.Application.Quit
' Release the object variable.
Set ExcelSheet = Nothing
By default, automation objects are created on the computer where the code is executed. You can create an
object on a remote networked computer by passing the name of the computer to the ServerName
argument of CreateObject. In addition, you can specify ServerName using DNS format or an IP address. The
following code returns the version number of Excel running on a remote network computer named
MyServer:
Function GetVersion

Dim XLApp

Set XLApp = CreateObject("Excel.Application", "MyServer")


GetVersion = XLApp.Version

End Function
An error occurs if the specified remote computer does not exist or cannot be found, for example, because
of security restrictions.

Confidential and Proprietary © 2021 352                                                           www.accruent.com


Note:
CreateObject is suitable for creating automation objects that do not act upon Meridian objects. For
access to Meridian objects, use the AMCreateObject Function instead, which works the same as
CreateObject but also passes the current Repository object to the IAMCommandSetInitialize interface of
the automation server.
The following example defines a procedure for a custom command that creates a Connection object to
connect to an Access database, creates a Recordset object to hold data from the connection, and sets a
document property to a value from the Recordset object:
Sub ReadSettings_Execute(Batch)

Dim cn, rs

Set cn = CreateObject ("ADODB.Connection")


Set rs = CreateObject ("ADODB.Recordset")

cn.ConnectionString = _
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\temp\test.mdb;Persist
Security Info=False"

cn.Open
rs.Open "SELECT * FROM Address", cn

Document.Test = rs.Fields(1).Value

rs.Close
cn.Close
Set rs = Nothing
Set cn = Nothing

End Sub

Confidential and Proprietary © 2021 353                                                           www.accruent.com


Object Arguments
An argument is an object property that you create to hold a value. Arguments can be used in VBScript as
global variables. An argument can contain any value, but it should not hold a reference to an object. An
argument can have any name. Meridian supports arguments for the Vault, Client, and Batch objects.
Object arguments are case-sensitive.
Following is an example of obtaining email information from Client arguments:
Sub DocGenericEvent_AfterNewDocument(Batch, Action, SourceFile,
DocType, DocTemplate)
vSubject = Client.Argument("Subject")
vSenderName = Client.Argument("From")
If IsEmpty(vSenderName) Then
vSenderName = Client.Argument("SenderName")
End If
WinMsgBox("AfterNewDocument( " & Document.FileName & _
" ): EmailSubject= [ " & vSubject & _
" ], SenderName= [ " & vSenderName & " ]")
End Sub
Some objects provide predefined arguments that are set with values by Meridian during certain
commands. Although these predefined arguments may contain object references, they are validated
internally in the context of their intended uses. Arguments that you create are not validated and errors can
occur if they are set to objects.

Confidential and Proprietary © 2021 354                                                           www.accruent.com


VBScript and PowerWeb
Not all VBScript functions are available to PowerWeb since it runs on the Meridian web server, not on the
client computer.
Following are the major functions that are not available, with corresponding recommended workarounds.

VBScript functions not available in PowerWeb

Function Workaround
Global variables Use object arguments instead as described in
Object Arguments.
DebugAssert Function Not supported
WinInputBox Function AskInput
WinMsgBox Function AskConfirmation
ProjectWorkflowEvent_InitializeExpandItem and Not supported
ProjectWorkflowEvent_BeforeExpandItem events
Confirmation property Not yet available
The Client object methods
CurrentView property
Vault Events None
AddDocumentToBatch method and Not yet available
AddDocuments method
Briefcase Object Import packages
DocGenericEvent_PrepareCommand event Not yet available
DocGenericEvent_OnProperties event when Not yet available
creating new folders
DocGenericEvent_AfterPrint event Not yet available
AS_PROP_CMD constants AS_PS_CMD_VIEW and Assign property validation conditions or use AS_
AS_PS_CMD_CANCEL in the DocGenericEvent_ PS_CMD_APPLY instead.
OnProperties event
AS_NFO_SHOWWIZARD constant Not yet available.

Confidential and Proprietary © 2021 355                                                           www.accruent.com


Note:
l The values of check boxes and radio buttons on PowerWeb pages are sent to the web server only if
they are selected (True). Meridian Enterprise Boolean properties that have not been explicitly set to
either True or False contain no value. For these reasons, we recommend that you always test the
values of Boolean properties for True and never for False whether the script is for PowerWeb or
not.
l A script that is not compatible with PowerWeb will not generate an error message. Thoroughly test
all VBScript configuration expressions and event procedures that might be invoked by PowerWeb.
l We highly discourage programmatic formatting of dates for use in title blocks, especially if
PowerWeb will be used. Dates are transferred over the Internet in a locale-independent format to
accommodate the possibility that the web server and PowerWeb locales are different. We
recommend that you use the date attribute formatting settings described in the Format attribute
date values article in the Meridian Enterprise Configuration Guide instead.

Confidential and Proprietary © 2021 356                                                           www.accruent.com


Formatting Text With RTF Codes
You can format the text shown by the WinInputBox and WinMsgBox functions using a limited set of Rich
Text Format (RTF) codes within the text. Many of the codes use the plus symbol (+) and minus symbol (-) to
enclose the text that they affect. The codes are only evaluated for the Prompt argument of the functions
and do not work in the Title argument text.
The following table describes the available codes.

Text formatting codes

Code Description
$RTF+/- Enable or disable formatting
$NL Inserts a new line
$CENTER+ Center justification
$RIGHT+ Right justification
$RESET Reset text justification (left justification)
$NUM+/- Numbered list
$B+/- Bold attribute
$I+/- Italic attribute
$U+/- Underline attribute
$UT+/- Thick underline attribute
$UDOT+/- Dot underline attribute
$UD+/- Dash underline attribute
$UDD+/- Dot dash underline attribute
$UDDD+/- Dot dot dash underline attribute
$UW+/- Wavey underline attribute
$STR+/- Strikethrough attribute
$SUB+/- Subscript attribute
$SUP+/- Superscript attribute
$CAPS+/- All capitals attribute
$BULLET+/- Bullet list

Confidential and Proprietary © 2021 357                                                           www.accruent.com


Code Description
$BLACK+/- Black color attribute
$BLUE+/- Blue color attribute
$CYAN+/- Cyan color attribute
$GREEN+/- Green color attribute
$MAGENTA+/- Magenta color attribute
$RED+/- Red color attribute
$YELLOW+/- Yellow color attribute
$WHITE+/- White color attribute
$DBLUE+/- Dark blue color attribute
$DCYAN+/- Dark cyan color attribute
$DGREEN+/- Dark green color attribute
$DMAGENTA+/- Dark magenta color attribute
$DRED+/- Dark red color attribute
$DYELLOW+/- Dark yellow color attribute
$DGRAY+/- Dark gray color attribute
$GRAY+/- Gray color attribute
$AUTO Automatic color attribute
$B_<ColorName>+/- Background color attribute where <ColorName> is one of the colors listed above.

The following example VBScript code incorporates several formatting codes to produce the result shown in
the following figure.
WinMsgBox "$RTF+Read each item in the following bulleted list
carefully:$NL" & _
"$BULLET+This is $B+bold$B- text.$NL" & _
"This is $I+italic$I- text.$NL" & _
"This is $U+underlined$U- text.$NL" & _
$BULLET-$NLWas this example helpful?$RTF-", _
AS_QUESTION Or AS_YESNO, _
"Formatted Text Example"

Confidential and Proprietary © 2021 358                                                           www.accruent.com


Confidential and Proprietary © 2021 359                                                           www.accruent.com
Meridian Enterprise Command Identifiers
The command identifiers (strings) that may be used as described in DocGenericEvent_PrepareCommand
event are listed below.

Identifiers
l Add to Collection
l Add to WorkList
l AttachPart
l Change Document Type
l Change Folder Type
l Change Manager
l Change ToDo Person
l Compare
l Create Draft Version
l Delete
l DeletePart
l DetachPart
l DiscardFromProject
l Draft Print
l LockMasterDocument
l MergedWithMaster
l New FileName
l NewRevision
l Off-line prepare
l Print Preview
l Properties
l ReassignManager
l ReassignProjectManager
l ReassignToDoPerson
l ReleaseToMaster
l Reroute
l RerouteProject
l Revoke document
l Revoke Draft Version
l Send Mail

Confidential and Proprietary © 2021 360                                                           www.accruent.com


l Set Field
l Set XRefs
l Show Versions
l Show XRefs
l Submit Draft Version
l SupersedByMaster
l Sync file cache (Local Workspace)
l Sync properties from database to file
l Sync properties from file to database
l Sync references from file to database
l Unlock file cache (Local Workspace)
l Unlock from briefcase
l Unlock from GCF
l UnlockFromProject
l UnlockMasterDocument
l Update thumbnails
l Update Title Block
l View

Confidential and Proprietary © 2021 361                                                           www.accruent.com


TagExtractor Component
Meridian Enterprise provides functionality for managing intelligent AutoCAD and MicroStation drawings
that contain equipment and functional location tags. The standard functionality can be configured as
described in the Accruent Meridian Asset Management Module Administrator's Guide and used as
described in the Accruent Meridian Asset Management Module User's Guide. This functionality can be
extended with VBScript programming as described in this appendix.
The TagExtractor component is a dynamic link library (TagExtractorUtl.dll) from which you can
create an automation object in scripting that exposes powerful properties and methods that you can use
to implement your own tag functionality. The DLL is installed in the Meridian Program folder and can be
used right away. For additional background on automation objects, see Automation Objects.
Using the TagExtractor component requires an Asset Management Client (M--AME) license for each user
that will execute the scripting.
The following topics describe the various object and their properties and methods that are provided by the
TagExtractor component.

Confidential and Proprietary © 2021 362                                                           www.accruent.com


TagExtractor Object
The TagExtractor object is created by the TaxExtractor component as described in TagExtractor
Component.
You can create a TagExtractor object with the AMCreateObject Function as shown in the following example
code.
Dim TagExtractor
Set TagExtractor = AmCreateObject("IcTagExtractor.IcTagExtractor")
If TagExtractor Is Nothing Then
‘Show error message and exit
Else
‘Do work here
End If
‘Close and destroy when done
TagExtractor.Close
Set TagExtractor = Nothing

Note:
Unlike the base VBScript objects, the TagExtractor object properties, methods, and result codes do not
appear in Object Browser of the Meridian Enterprise Script Editor.

TagExtractor Object Methods


The TagExtractor object provides the following methods.

Open Method
Opens an AutoCAD or MicroStation drawing from which to extract the tags that it contains.

Syntax
Open(FileName As String) As Integer

Parameters

Name Description
FileName Fully-qualified path of the file in the local workspace to open.

Return Value
One of the codes listed in TagExtractor Result Codes.

Confidential and Proprietary © 2021 363                                                           www.accruent.com


Example
Dim ResCode
ResCode = TagExtractor.Open(sFileName)

SetAdditionalFilter Method
Sets a path filter to search for tag proxy objects in the vault.

Syntax
SetAdditionalFilter(iFilterType As Integer, sVaultPath As String)

Parameters

Name Description
iFilterType Specifies the filter type. The only supported type is parent folder. Always set this parameter
to 1.
sVaultPath Vault path (recursive) in which to limit tag searches.

Return Value
This method returns no values.

Remarks
By default, the SyncTagReferences method searches for tags in the entire vault using the settings of the Tag
document type and Tag indication property options (on the AMM Settings page in the vault
configuration) and the tag number. Use this method to search for tags only in the specified vault folder
(and its sub-folders) without using the Tag document type setting.
Examples
To set a filter:
TagExtractor.SetAdditionalFilter 1, sVaultPath
To disable a filter:
TagExtractor.SetAdditionalFilter 1, Nothing

Confidential and Proprietary © 2021 364                                                           www.accruent.com


SyncTagReferences Method
Searches for tag proxy objects in the vault and creates Meridian references between them and the current
drawing.

Syntax
SyncTagReferences() As Integer

Return Value
One of the codes listed in TagExtractor Result Codes.

Remarks
The direction of the references is as set in the asset management settings of the vault. The scope of the tag
search can be limited by the SetAdditionalFilter method.

Example
Dim ResCode
ResCode = TagExtractor.SyncTagReferences

SaveLogToFile Method
Creates a log file that contains the results of the SyncTagReferences method.

Syntax
SaveLogToFile (sLogFile As String) As Integer

Parameters

Name Description
sLogFile Fully-qualified path where to save the log.

Return Value
One of the codes listed in TagExtractor result codes.

Remarks
Call this method after performing the tag extraction with the SyncTagReferences method.

Confidential and Proprietary © 2021 365                                                           www.accruent.com


Example
Dim ResCode
ResCode = TagExtractor.SaveLogToFile(sLogFile)

CreateHotSpotList Method
Creates hotspot bounding box data for the tags found in the current drawing that can be viewed in the
AutoVue viewer.

Syntax
CreateHotSpotList() As Integer

Return Value
One of the codes listed in TagExtractor result codes.

Remarks
Hotspot data is stored in the vault separate from the drawing file.

Example
Dim ResCode
ResCode = cTagExtractor.CreateHotSpotList

TagCollection Method
Returns a collection of all tags found in the current drawing.

Syntax
TagCollection(oResCode As Object) As TagCollection

Parameters

Name Description
oResCode Result code object in which to return the result of the method.

Return Value
A collection of Tag objects.

Confidential and Proprietary © 2021 366                                                           www.accruent.com


Remarks
To get a collection of all tags with a specific tag type, use the TagExtractor.TagCollectionEx method.

Example
Dim TagCollection
Dim ResCode
Dim Tag

Set TagCollection = TagExtractor.TagCollection(ResCode)


'Iterate through the collection
For Each Tag In TagCollection
‘Do work here
Next

TagCollectionEx Method
Returns a collection of all tags of the specified tag type found in the current drawing.

Syntax
TagCollectionEx(oResCode As Object, iCollectionType As Integer) As
TagCollection

Parameters

Name Description
oResCode Result code object in which to return the result of the method.
iCollectionType Integer that represents the type of tags to find:
1 — all tags
2 — resolved tags only
3 — unresolved tags only

Return Value
A collection of Tag objects.

Remarks
To get a collection of all tags regardless of the tag type, use the TagExtractor.TagCollection method.

Confidential and Proprietary © 2021 367                                                           www.accruent.com


Example
Dim TagCollection
Dim ResCode
Dim Tag

Set TagCollection = TagExtractor.TagCollectionEx(ResCode,


iCollectionType)
'Iterate through the collection
For Each Tag In TagCollection
‘Do work here
Next

Confidential and Proprietary © 2021 368                                                           www.accruent.com


TagCollection Object
A TagCollection object is returned from by the TagExtractor.TagCollection method,
TagExtractor.TagCollectionEx method, or represented by a TagExtractor.TagIterator object. It contains a
collection of Tag objects.

TagCollection Object Properties


The following sections describe the TagCollection object properties.

TagPrefix Property
Gets the value of the property specified for the TagPrefixPropertyDef setting in the vault.

Syntax
TagPrefix As String

Remarks
For information on configuring tag prefixes and postfixes, see the AccruentMeridian Asset Management
Module Administrator's Guide.

TagPostfix Property
Gets the value of the property specified for the TagPostfixPropertyDef setting in the vault.

Syntax
TagPostfix As String

Remarks
For information on configuring tag prefixes and postfixes, see the AccruentMeridian Asset Management
Module Administrator's Guide.

Confidential and Proprietary © 2021 369                                                           www.accruent.com


Tag Object
The Tag object is a member of a collection returned by the TagExtractor.TagCollection method,
TagExtractor.TagCollectionEx method, or represented by a TagExtractor.TagIterator object described in
TagIterator Object.

Tag Object Properties


The Tag object provides the following properties.

Tag Property
The value of the drawing tag.

Syntax
Tag As String

Example
Dim TagValue
TagValue = Tag.Tag

TagType Property
The type of the drawing tag.

Syntax
TagType As String

Example
Dim TagType
TagType = Tag.TagType

Confidential and Proprietary © 2021 370                                                           www.accruent.com


BlockList Property
A collection of the blocks in the current drawing that contains the tag represented by the current Tag
object.

Syntax
BlockList As Object

Remarks
Each block in the collection has only one (string) property: BlockName.

Example
Dim Blocks
Blocks = Tag.BlockList

ObjectList Property
A collection of the tag proxy objects in the current vault that represent the current Tag object.

Syntax
ObjectList As Object

Remarks
This collection is typically empty or contains only one tag proxy object. Each tag proxy object has only one
(string) property: ObjectID that corresponds to the Meridian document ID property.

Example
Dim TagObjects
TagObjects = Tag.ObjectList

Confidential and Proprietary © 2021 371                                                           www.accruent.com


TagIterator Object
The TagIterator object provides easier access to a set of Tag objects than a collection returned by the
TagCollection method and TagCollectionEx method. It provides a forward-only way to step through a
collection and immediately retrieve Tag properties without instantiating a Tag object.
You can create a TagIterator object as shown in the following example code where iCollectionType
is an integer that represents the type of tags to find:
l 1 — all tags
l 2 — resolved tags only
l 3 — unresolved tags only
Dim TagIterator
Set TagExtractor = TagExtractor.TagIterator(iCollectionType)

TagIterator Object Properties


The following sections describe the TagIterator object properties.

IsValid Property
True if the current TagIterator collection is not empty. False if it is empty.

Syntax
IsValid As Boolean

Count Property
Gets the number of tags in the TagIterator collection.

Syntax
Count As Long

Tag Property
Gets the (string) value of the current Tag object in the TagIterator collection.

Syntax
Tag As String

Confidential and Proprietary © 2021 372                                                           www.accruent.com


Remarks
This property is equivalent to the Tag property of the Tag object.

TagType Property
Gets the type of the current Tag object in the TagIterator collection.

Syntax
TagType As String

Remarks
This property is equivalent to the TagType property of the Tag object.

BlockArray Property
Gets an array of the block names in the current drawing that contains the tag represented by the current
Tag object in the TagIterator collection.

Syntax
BlockArray As String

Remarks
This property is equivalent to the BlockList property of the Tag object.

ObjectArray Property
Gets a collection of the tag proxy objects in the current vault that represent the current Tag object in the
TagIterator collection.

Syntax
ObjectArray As Long

Remarks
This property is equivalent to the ObjectList property of the Tag object.

Confidential and Proprietary © 2021 373                                                           www.accruent.com


TagIterator Object Methods
The following sections describe the TagIterator object methods.

Start Method
Sets the index position to the first Tag object in the current TagIterator collection.

Syntax
Start

Return Value
This method returns no values.

Remarks
Use the TagIterator.Step method to advance the index position to the next available Tag in the current
TagIterator collection.

Example
Dim TagExtractor
Set TagExtractor = AmCreateObject("IcTagExtractor.IcTagExtractor")
Dim TagIterator
Set TagIterator = TagExtractor.TagIterator(iCollectionType)

If TagIterator.IsValid Then
‘Iterate through the collection
TagIterator.Start
Do
‘Do work here
Loop While TagIterator.Step
End If

Step Method
Advances the index position to the next available Tag in the current TagIterator collection.

Syntax
Step As Boolean

Return Value
Returns True if the next Tag exists.

Confidential and Proprietary © 2021 374                                                           www.accruent.com


Remarks
Use the TagIterator.Start method to set the index position to the first available Tag in the current
TagIterator collection.

Example
Dim TagExtractor
Set TagExtractor = AmCreateObject("IcTagExtractor.IcTagExtractor")
Dim TagIterator
Set TagIterator = TagExtractor.TagIterator(iCollectionType)

If TagIterator.IsValid Then
‘Iterate through the collection
TagIterator.Start
Do
‘Do work here
Loop While TagIterator.Step
End If

Confidential and Proprietary © 2021 375                                                           www.accruent.com


TagExtractor Result Codes
This TagExtractor methods return the following result codes that you can use in your scripting logic to
control procedure flow.

TagExtractor result codes

Code Description
-1 Unspecified error
0 Operation succeeded
1 One or more libraries needed to access the document data were not found
2 Specified file was not opened
3 Specified file cannot be opened
4 Documents of this version are not supported
5 Document that was opened is not from the vault
6 Some objects are not found. A list of unresolved tags may be saved to file by the SaveLogToFile
method.
7 Cannot save log to file
8 Empty log
9 Asset settings are not found
10 No license found
11 License is invalid
12 Invalid patch area
13 Patch area is expired

Confidential and Proprietary © 2021 376                                                           www.accruent.com


Publishing And Rendering Options
When documents are registered by the source vault's VBScript event handlers, publishing options and
rendering options can be specified that modify the publishing job. These options can be set using the
RegisterDocument method described in RegisterDocument method.
The Meridian Enterprise system link supports the options described in the following table when the
destination system is another Meridian Enterprise vault. The Microsoft SharePoint system link also
supports publishing options, however they must be specified in a customized SharePoint workflow
template. The publishing options are not supported by the Windows file system link.
Note:
If an option accepts a value and the value is empty, the publishing job settings are used. If the value is
invalid (missing < or > characters), the job will fail.

Publishing options

Option Description
_CDWF_ The document is published to the destination system immediately
<WorkflowDefinitionName into the specified workflow state.
;WorkflowStateName>_
_DATAONLY_ The document content is not transmitted, only the property values.
This option is typically used together with the _NORENDER_ option.
_DELETE_ The document is deleted from SharePoint libraries when the Meridian
OR Enterprise source document is deleted. If the destination filename is
not specified, the name of the document registered for publishing is
_DELETE_<FileName> used.
Due to the risk of accidental data loss, this option is only available if
the EnableRemoveSharePointTargetoption is set to true in the
following file. Be certain that you want to use this option before
enabling it.
C:\ProgramData\BlueCieloECM\EnterpriseServices
\PublishingCapability.dat

_LIB_<Title>_ The title of the SharePoint library to publish to. If specified, the value
replaces the Library option that is configured in the publishing job.
Note:
This option is supported by the SharePoint publishing module only.

_NOREDLINES_ Prevents the publishing of redlines.

_NORELEASE_ The document is not released in the destination vault after


publishing.

Confidential and Proprietary © 2021 377                                                           www.accruent.com


Option Description

_OVERWRITE_ If any revisions of the document exist in the destination system, they
are deleted before the current revision from the source system is
published.
Note:
This option is supported by the SharePoint publishing module only.

Confidential and Proprietary © 2021 378                                                           www.accruent.com


Option Description
_PUBLISHONLY_ A safeguard for certain configurations in which a document can be
<PropertySet.PropertyName;Pr rendered and published before changes to the document are saved in
opertyValue>_ the vault. This can result in an invalid rendition in the destination
system.
Specify the name of a custom property for the source system link to
check for a specified value before publishing the document. If the
property does not contain the specified value, the document is not
published by that attempt, the text Document is not ready for
publishing is saved in the publishing log, and the property is
rechecked on each retry.
Scripting is responsible for setting the value prior to publishing and
resetting the value after publishing unless the value is unique for each
document.
Following :
Sub DocWorkflowEvent_AfterChangeWFState(Batch,
_
SourceState, TargetState, Person,
Comment)
Dim PublishNo

If (SourceState = AS_WF_UNDERCHANGE) And _


(TargetState = AS_WF_RELEASED) Then

'Set Property for _PublishOnly_ option


Document.PublishNo = CreateGUID
PublishNo = Document.PublishNo

' Send document to Publisher


Set Publisher = New
PublisherScriptObject
'Register current document for
publishing
Call Publisher.Queue.RegisterDocument
("", _
"398328B7", Document.ID, _
, "_PUBLISHONLY_<Custom.PublishNo;"
& _
PublishNo & ">_" ,_
, Vault.User.Name, , _
"Custom.PublishStatus")
'Release the script object.
Set Publisher = Nothing

End If

Confidential and Proprietary © 2021 379                                                           www.accruent.com


Option Description
End Sub

We recommend setting the value to the document revision number


using Document.VersionID, a vault sequence number using
Vault.Sequence(Name), or a globally unique ID (GUID).
Note:
Following is an example of getting a GUID in VBScript:
Function CreateGUID
Dim TypeLib
Set TypeLib = CreateObject
("Scriptlet.TypeLib")
CreateGUID = Left(TypeLib.Guid, 38)
End Function

_RENDERLAYOUTS__ Renders each of the specified layouts to a separate rendition. This


<LayoutName1;LayoutName2;. option is supported for AutoCAD and Revit drawings rendered with
..LayoutNameN>_ the AutoCAD rendering module, AutoVue rendering module, and
Teigha DWG rendering module only. Specify the layout names to
render in a semicolon-delimited list. By default, the name of the
rendition is a combination of the source file name and the layout
name (<FileName_LayoutName>). You can specify a different name
with a VBScript expression as the value of the Use property value
from source document option of the job configuration.
Use the VBScript property Document.LayoutsNames to retrieve the
layout names for the current document. The title block attribute or
sheet property names must be configured in the appropriate
application link settings of the vault configuration as described in the
Accruent Meridian Enterprise Configuration Guide.
If the source document and the renditions reside in the same
Meridian Enterprise vault, the rendition type Layout Rendition
Reference (RTRenditionReference) will be created in the vault if it
does not already exist. That rendition type will be used to create
references between the source document and the renditions. The
name of each reference is the layout name.

Confidential and Proprietary © 2021 380                                                           www.accruent.com


Option Description

_RESERVE_ Checks the document out in the destination system, creating a new
major or minor revision depending on the system configuration. The
OR revision can be revoked and the new revision deleted by the _
_RESERVE_<FileName> UNRESERVE_ option.
Note:
l This option is supported by the SharePoint publishing module
only.
l If the destination filename is not specified, the name of the
document registered for publishing is used.
l The document will be checked out by the Meridian Enterprise
system account.
l Do not use with the _UNRESERVE_ or _DELETE_ options in the
same operation or only the first option will be applied.
l The Comment (workflow log) property is not updated by this
option.
_RETIRE_ The document is not published to the destination system, but the
existing document in the destination vault is retired.

_RETRY_<Count>_ If the job fails for any reason, restart the job in the queue <Count>
times or until the job succeeds, whichever comes first.
Note:
This option overrides the Number of retries if publishing fails
setting described in Publishing And Rendering Options.

_SITE_<URL>_ The URL of the SharePoint site and subsite (if applicable) to publish to.
If specified, the value replaces both the Site address and the Subsite
options that are configured in the publishing job.
Note:
This option is supported by the SharePoint publishing module only.

_UNRESERVE_ Revokes the checkout done by the _RESERVE_ option of the specified


document in the destination system and deletes the unreleased
OR revision.
_UNRESERVE_<FileName>
Note:
l This option is supported by the SharePoint publishing module
only.
l If the destination filename is not specified, the name of the
document registered for publishing is used.
l Do not use with the _UNRESERVE_ option in the same
operation or only the first option will be applied.

The rendering modules support the options described in the following table.

Confidential and Proprietary © 2021 381                                                           www.accruent.com


Rendering options

Option Description
_NOPOSTRENDER_ Disables all rendition post-processing actions (for example, watermarks or
signature pages).
_NORENDER_ Disables all document rendering and an empty file is published to the destination
vault. This option is typically used together with the _DATA_ONLY_ option.
_PAGERANGE_ Renders only the specified range of pages. This option may be specified in any of
<Start;End>_ the formats that are described in the following table.
Note:
This option is supported by the AutoVue rendering module only.
Supported Formats
l _PAGERANGE_<>_

Current page
l _PAGERANGE_<;>_

All pages
l _PAGERANGE_<n;n>_

Pages n to n
l _PAGERANGE_<n;>_

Page n to the end of the document


_PRINTING_ Allows you to get and set the print quality to use with PDFTron. You can set a
QUALITY value between 1 and 15. Higher values result in higher quality, but takes longer
to render. Values between 3 and 6 are suitable for most purposes. Beyond 6,
quality increases by diminishing amounts. If no value is set, the default value of 1
is used. The property exists within the BCRenditionPropertySet. For
example, Document.Property("BCRenditionPropertySet._
PRINTING_QUALITY").
_REVITSETUP_ Uses the parameters configured in the specified export setup to render the Revit
<ExportSetupName> project instead of the options configured in the publishing job. If the export
_ setup cannot be found, then the configured options will be used.

Confidential and Proprietary © 2021 382                                                           www.accruent.com


Glossary

Active Directory
A Microsoft directory service that provides central authentication and authorization
services for Windows-based computers.

AMFS
The InnoCielo File System service that makes vaults available through the Windows file
system.

approved
A workflow status that indicates that a document that has been approved for
reproduction, distribution, manufacture, or construction.

archive
When used as a noun, a repository of obsolete documents kept for possible future
reference. When used as a verb, the process of exporting obsolete documents from a
repository.

assign to work area


The process of creating a copy of a document in a work area to isolate its changes from
the original revision in the Main area.

attribute
When used to describe a file system, it is a property of a file such as Hidden, System, or
Read Only. When used to describe an AutoCAD drawing, a named object in a drawing that
is included in a block definition and used to store alphanumeric data.

audit log
A system-generated record of the date and time of user actions that create, modify, or
delete critical business data.

audit trail
A system-generated record of the date and time of user actions that create, modify, or
delete critical business data.

authorization key
The ten character hexadecimal code generated by BlueCielo ECM Solutions that
authorizes a software license indefinintely. Authorization keys are generated based on the

Confidential and Proprietary © 2021 383                                                           www.accruent.com


license serial number, license key, and return key specific to each installation.

baseline
When used to describe Meridian Enterprise, a named moment in time in the history of a
vault, such as a milestone.

Basic Authentication
A method designed to allow a web browser, or other client program, to provide
credentials – in the form of a user name and password – when making a request from a
server.

briefcase
A Accruent portable document package. A briefcase is a single file in an archive format
that may contain multiple discrete documents. Briefcases may be in open standard
formats such as ZIP and RAR, the Accruent BRC format, or custom formats. A briefcase
may also contain document metadata in a data file and, in the Accruent BRC format,
document redlines.

client
A computer, object, or program that obtains data or services from a server.

COM
Component Object Model - an interface standard for software componentry by Microsoft
used to enable interprocess communication and dynamic object creation by programs.

content
The electronic data associated with a document.

content indexing
The process of extracting and indexing text data from documents for full-text searching.
See also "full text search".

context
When used to describe Meridian Enterprise, a frame of reference comprised of a specific
compartment of a vault and a moment in time for viewing the content of a vault.

criterion
A search filter condition comprised of a property name, operator, and value.

Confidential and Proprietary © 2021 384                                                           www.accruent.com


current
In general, the object that a user has selected or an object that is currently within the
scope of a programming expression. When used to describe the history of a document,
the latest revision of a document, which might not yet be released.

data source
An external data file or database that provides data that is presented by or imported into
a Accruent system.

database
A structured set of document metadata used by a Accruent system. The database may be
managed by Hypertrieve, SQL Server, or Oracle depending on the system.

DB
An Oracle database.

DCOM
Distributed Component Object Model - a Microsoft proprietary technology for software
components distributed across several networked computers to communicate with each
other.

derive
To create a new document based on an existing document. Also the name of a Meridian
Enterprise command.

destination state
The state of a Meridian Enterprise workflow that follows a workflow transition.

details page
A type of property page that displays the properties of a document.

digital signature
A digitized image of a person's handwritten signature. See also "electronic signature".

discard
When used to describe Meridian Enterprise, to cancel the process of revising a document
and delete the file copy that is being edited.

document
Information recorded on a medium (paper, digital media, and so on) for communication
to others.

Confidential and Proprietary © 2021 385                                                           www.accruent.com


document controller
A person within a facility owner/operator organization that is responsible for the
management of project documents.

document type
A classification of documents that share one or more document management
characteristics such as format, purpose, or security.

document type workflow


A predetermined sequence of steps through which a document must be processed to
generate a new approved revision in Meridian Enterprise. The workflow is defined by the
document type from which the document was created.

document view
A view of a Meridian Explorer repository that displays documents.

document workflow interlock


A rule consisting of specific document types and property filters that limit when a
project’s workflow may proceed. Interlocks are configured by a system administrator with
the Meridian Enterprise Configurator application. Interlocks are available only with the
Meridian Advanced Project Workflow Module.

domain controller
A server that responds to security authentication requests (logging in, checking
permissions, and so on) within a Windows Server domain.

dynamic collection
A Meridian Enterprise saved search in which the search criteria are reevaluated and the
results are updated whenever the collection is displayed.

e-signature
An electronic indication that a person adopts the contents of an electronic message. See
also "digital signature".

ECM
Engineering Content Management. Content management as it applies specifically to
engineering.

EDM
Engineering Document Management. Document management as it applies specifically to
engineering documents.

Confidential and Proprietary © 2021 386                                                           www.accruent.com


effectivity
An attribute of a Meridian Enterprise property that determines when changes to its value
apply within the life cycle of a document.

electronic signature
An electronic indication that a person adopts the contents of an electronic message. See
also "digital signature".

environment
An organization's overall computing platform.

Explorer view
The view of a Meridian vault that displays documents organized within the Field-Path
Relation.

external page
A type of property page that displays a web page that is hosted on a different information
system.

Field-Path Relation
A hierarchical structure defined by properties that determines the folder structure of a
vault and the locations of documents according to the values of the properties.

Folders view
The view of a Meridian Enterprise vault that displays documents organized by the vault's
Field-Path definition.

FS
An acronym for file system.

full-text search
A method of searching for text contained in document content as opposed to searching
document metadata. See also "content indexing."

grid view
Name of a Meridian Explorer view mode that displays search results in tabular format.

GUID
An acronym for Globally Unique Identifier.

Confidential and Proprietary © 2021 387                                                           www.accruent.com


H

history
A configurable option of a Meridian vault that causes it to save changes to documents and
metadata over time. Allows users to view prior revisions of documents and their property
values at specific moments in the past.

History mode
A configurable option of a Meridian vault that causes it to save changes to documents and
metadata over time. Allows users to view prior revisions of documents and their property
values at specific moments in the past.

HTTP
An acronym for Hypertext Transfer Protocol.

hybrid drawing
A drawing composed of both vector graphics and raster image files.

import
The process of creating a new file in a vault from a file outside the vault or repository .

inactive user
A user account that has been deactivated. The account is not deleted but the user cannot
use the application. The account can be reactivated later.

initiate
The act of starting a new revision of a document by performing the first step of a
workflow.

issue code
The name of a Meridian Transmittal Management Module property that stores a
standard keyword or phrase. The issue code describes the reason why a transmittal was
issued.

layout
A configurable arrangement of items on a form or page.

Confidential and Proprietary © 2021 388                                                           www.accruent.com


LDAP
An acronym for Lightweight Directory Access Protocol.

Local Workspace
A portion of disk space on a user's computer reserved for caching documents when they
are viewed or edited. Using Local Workspace improves performance when working with
very large documents. Meridian Enterprise's local workspaces can be synchronized with
the vault at a configurable interval.

lookup list
A list of predetermined values for a property that is presented to the user for selection.
Lookup lists can be either managed in the application or linked to an external database or
query.

Main area
The area of a Meridian vault where released documents reside.

manager
The Meridian user who initiated the current document workflow and the only person with
permission to change the current To-Do Person.

master document
In Meridian Enterprise, a released document from which one or more project copies are
made that become either independent documents or new revisions of the master
document. Master documents are designated by Meridian Enterprise and the Meridian
Advanced Project Workflow Module. In Accruent Project Portal, a document to which a
master file is attached.

Meridian Enterprise Server application server


The Meridian Enterprise Server data access and business services running on a server
computer. May also be used to refer to the server hosting the services.

Meridian Explorer client


The Meridian Explorer application installed on the Meridian Enterprise Server web
server.

metadata
Information that classifies, supplements, or describes a document. Metadata is commonly
used to find documents as opposed to searching for data within documents (see “full-text
search”). Metadata may also be used for a variety of other purposes.

Confidential and Proprietary © 2021 389                                                           www.accruent.com


N

NAT
An acronym for Network Address Translation.

Navigation view
A view of a Meridian vault that displays documents organized in a hierarchical structure
according to a predefined set of properties.

OS
An acronym for operating system.

OU
An acronym for organizational unit.

package
A set of files that are used together for a common purpose. The files are often bound
together in a single archive file for convenience when transporting, such as .zip and .msi
files. Examples of file packages are software distribution packages and submittal
packages. See also “briefcase.”

pane
A separate area of a split or single window used to display related data.

performance counter
Stores the count of specific program activities on a computer to conduct low-level
performance analysis or tuning.

PowerUser
The Meridian desktop client software. Not related to the Windows administrative group
Power Users.

PowerWeb
The Meridian Enterprise web browser-based client application.

preselection
A property filter that can be applied to a Meridian Explorer view to limit the number of
visible items.

Confidential and Proprietary © 2021 390                                                           www.accruent.com


privilege
The right of a user to view specific data or execute a specific command. Privileges are
assigned by a system administrator.

project copy
A copy of a master document made for the purpose of creating a new independent
document or creating a new revision of the master document. Project copies can be
created in Meridian Enterprise.

project definition
A template used to create special folders in a vault that can represent design project
processes. Project definitions are configured by a system administrator with the Meridian
Enterprise Configurator application. Meridian Advanced Project Workflow Module project
definitions consist of a custom folder type, a workflow, and optional project workflow
interlocks or document workflow interlocks. A project definition may restrict folders from
being created at the root of a vault and may restrict creation of subprojects (Meridian
Advanced Project Workflow Module only).

project folder
A folder created from a project definition template.

project workflow
The workflow of a project folder as defined by the project definition template from which
it was created. Configured by a system administrator with the Meridian Enterprise
Configurator application.

project workflow interlock


A rule comprised of specific sub-project folder types and property filters that is applied to
a project or subprojects that limits when a project’s workflow may proceed. Interlocks are
configured by a system administrator with the Meridian Enterprise Configurator
application. Interlocks are available only with the Meridian Advanced Project Workflow
Module.

property
Descriptive data used to identify, classify, and find documents. Properties are organized
into related groups called property sets.

property navigation
A dynamic search method in which a user progressively reduces the number of
documents found by selecting from additional property values.

Confidential and Proprietary © 2021 391                                                           www.accruent.com


property page
A secondary window, usually displayed with a tab, that displays the properties of an object
such as a document.

property set
A group of related properties.

publish
To create a copy of a document in another information system, optionally in a different
electronic format.

purge
To completely and permanently delete data from a system.

query
A search command comprised of one or more search criteria often expressed in
Structured Query Language (SQL) syntax.

Quick Change
A very simple document workflow consisting of only two steps, Start Quick Change and
Release Quick Change that may or may not increment the document's revision number
depending on the configuration of the document type.

reassign
To immediately assign a document to the current work area for additional changes after
discarding or releasing the current revision.

recovery log
The log of vault documents that can be executed in order to export the documents from a
vault to a specified location on the file system. The recovery log is created for use in the
event of a critical disaster to provide continued access to documents.

redline
Corrections to a drawing made graphically on a copy of the drawing. Redlines can be
created for electronic drawings with the InnoCielo viewer by a user with the appropriate
security privileges.

Confidential and Proprietary © 2021 392                                                           www.accruent.com


reference
A link that represents a relationship between two documents. References can be created
automatically by Meridian (for example, AutoCAD External Reference) or manually by a
user.

reference type
A classification of references that share one or more document management
characteristics such as purpose, source or destination document types, or security.

references page
A type of property page that displays the references of a document.

related documents page


A type of property page that displays the documents that are related to the selected
object.

related tags page


A type of property page that displays the asset tags that are related to the selected
document.

release
The final step (transition) of a Meridian Enterprise workflow. When describing project
workflow, refers to a new revision of a master document that was created from the
content of a project copy. When describing document type or workflow definition
workflows, refers to a new revision of the document that was created by completing the
document’s workflow.

render
Rendition (noun) refers to a copy of a document in a format other than the original.
Render (verb) refers to the process of creating a rendition.

rendition
Rendition (noun) refers to a copy of a document in a format other than the original.
Render (verb) refers to the process of creating a rendition.

repository
The largest logical container of a document management system for storing documents
and metadata. A repository commonly contains all of the documents for a single
organization, division, department, workgroup, or other purpose, organized into folders
and sub-folders. The fundamental container of a Meridian Explorer system.

result grid
A configurable grid view used to display documents or tags found by a search.

Confidential and Proprietary © 2021 393                                                           www.accruent.com


retire
To classify a document as obsolete and prevent it from being revised.

return code
A standard keyword or phrase that represents the reason why a submittal was issued.

review
The process of evaluating the accuracy and completeness of revisions to a document.

revision
A milestone in a document's history that represents approved information at particular
point in time identified by a number or letter.

revisions page
A type of property page that displays a list of the revisions of a document.

revoke
The act of canceling revision of a working copy of a document and deleting the copy
being edited.

role
A named set of privileges to which users or groups are assigned by an administrator.

RPC
Acronym for Remote Procedure Call.

saved search
A user-defined set of search criteria that is saved for future reuse.

scope
A Meridian Enterprise feature that limits vault functionality and the visible information to
named sets. A scope can be selected by users to make the system easier to use or to gain
access to different documents.

search layout
A configurable combination of repository navigation and search filter parameters used by
Meridian Explorer.

server
A centralized computer or application that provides services to one or more client
computers or applications in a network.

Confidential and Proprietary © 2021 394                                                           www.accruent.com


shared workspace
A special folder in a Meridian Enterprise vault that is used to store files to support multi-
user applications. The vault folder is mapped to a shared network location outside the
vault that is used instead of local workspaces on the users' computers. Meridian
Enterprise synchronizes the contents of the shared network location with the vault folder.
Configurable options control other behaviors specific to using a shared workspace.

shortcut bar
The name of the accordion control containing shortcuts to views, vaults, and baselines
that can be displayed in the left pane of the Meridian Enterprise desktop application.

SID
An acronym for System Identifier. A name that identifies a specific instance of a running
Oracle database.

SMTP
An acronym for Simple Mail Transport Protocol.

snapshot
A read-only copy of metadata made so that slower data backup processes can occur while
the application continues writing to its data. Backing up a snapshot minimizes
maintenance downtime.

source state
The state of a workflow that precedes a workflow transition.

SSL
An acronym for Secure Sockets Layer or Transport Security Layer.

SSL/TLS
An acronym for Secure Sockets Layer or Transport Security Layer.

static collection
Saved search results that are displayed without reevaluating the search criteria.

sub-project
A Meridian Enterprise project folder contained within another project folder that can
represent a subordinate process. Subprojects are available only with the Meridian
Advanced Project Workflow Module.

submit
When used to describe a document, means to check in the working copy of a document
that is under revision. Equivalent to releasing a document from a workflow.

Confidential and Proprietary © 2021 395                                                           www.accruent.com


submittal
A package of documents received by an organization for review, reference, modification,
or final delivery.

tag
A vault or repository record that represents a logical asset stored in a separate
maintenance management system. The logical asset represents a physical asset that is
present at a facility that is managed with the maintenance management system. A tag
may reference one or more documents, or the reverse.

tag type
The document type that is configured for use as asset tags.

thumbnail
A small preview image that is shown to assist the user in identifying a file.

TLS
An acronym for Secure Sockets Layer or Transport Security Layer.

To-Do List
The name of a navigation view in Meridian Enterprise.

transaction isolation
A property in a database system that defines how and when the changes made by one
operation become visible to other concurrent operations.

transition conditions
Property value filters and logical expressions that are evaluated to determine the validity
of a workflow transition to be executed by a user.

transition equivalence
The equality of a Meridian Enterprise transition in one document workflow to a transition
in another document workflow. Transition equivalence makes it possible to execute a
transition for one document in a batch of documents and have it also execute transitions
in the other documents within the batch even if the transitions don’t have the same name,
source state, or destination state. Configured by a system administrator with the
Meridian Enterprise Configurator application. Transition equivalence is available only
with the Meridian Advanced Project Workflow Module.

Confidential and Proprietary © 2021 396                                                           www.accruent.com


transmittal sheet
A cover letter for a submittal that lists the names and other property values of the
documents that are included in the submittal. It might also include comments about the
status of the documents or the project, instructions to the recipient, and a date by which a
response to the submittal is due back to the sender.

unretire
To reverse the effects of retiring a document so that it can be revised.

URL
An acronym for Uniform Resource Locator used to specify Internet and intranet
addresses.

vault
A Meridian repository for storing documents related by organization, division,
department, workgroup, or purpose.

VBScript
The Visual Basic scripting language (Visual Basic Scripting Edition).

version
A document derived or copied from another document of the same revision.

VPN
An acronym for Virtual Private Network.

WAN
An acronym for wide area network.

watermark
Textual or graphic information overlaid on a printed document used to indicate
authenticity or validity.

Web Access
The Meridian Enterprise web browser-based client application.

Confidential and Proprietary © 2021 397                                                           www.accruent.com


web client
A client application that is presented in a web browser.

work area
A virtual container in a Meridian vault where copies of documents can be assigned to
undergo related revision isolated from the original revisions in the Main area.

Work Isolation mode


The vault or work area setting that defines how and when the changes made by one user
become visible to other concurrent users.

workflow
A predetermined sequence of steps used to produce standardized results.

working copy
A temporary copy of a document made for making changes as an alternative to document
workflow.

workstation
A personal computer used by an individual in a network. A workstation is the client in a
client/server system.

X-Ref
An AutoCAD drawing that is linked to, but not inserted into, the current drawing. Changes
made to referenced drawings (X-Refs) are automatically displayed in the current drawing
when the current drawing is opened.

Confidential and Proprietary © 2021 398                                                           www.accruent.com


AIMS_UpdateChangeManagement
function 196
Index AIMS_UpdateComment event 245
AllEmails property 163
AMCreateObject function 197
_
AMMGetCustomColumnHeaders function 198
_CDWF_ publishing option 377 AMMGetCustomColumnValues function 199
_DATAONLY_ publishing option 377 AMMGetReportCustomHeaderValues
_LIB_ publishing option 377 function 202
_NOPOSTRENDER_ rendering option 382 AMMGetReportTableRowValues function 203
_NOREDLINES_ publishing option 377 AMMMainTagDocumentId function 206
_NORELEASE_ publishing option 377 AMMPropertiesToBeRequested function 207
_NORENDER_ rendering option 382 AMMTags4TagPageIsVisible function 208
_PAGERANGE_ rendering option 382 AMMTagsManageLinksIsAllowed function 209
_RETIRE_ publishing option 380-381 AMMTagsPageIsVisible function 210
_RETRY_ publishing option 378, 381 AMMUseMainTag function 211
_SITE_ publishing option 381 AMMWhereUsedManageLinksIsAllowed
function 212
A AMMWhereUsedPageIsVisible function 213
AMUIExtension.GetParentFolder 65, 82, 176
Abort method 24
ApplyPropertyValues method 59, 105
account 17, 60, 89, 101, 115-116, 120, 126, 133,
archive 253
138, 149, 153, 163, 168, 187, 189, 191, 381
Archive method 37
Add method 18, 122, 141
Argument(Name) property
AddAssignment property
Batch object 20
Roles object 146
Client object 38
AddDocuments method 24
Vault object 167
AddReorderingComment method 58
arguments
Address property 120
object arguments 354
AddValues method 153
Prompt argument and RTF codes 357
AfterReplaceReleased event 313
Assignments property
AIMS_AddComment event 238
Roles object 145
AIMS_Attach_After event 242
Attachment object properties 17
AIMS_Attach_Before event 240
FilePath 17
AIMS_Attach_Intialize 239
Attachments object 18
AIMS_CloseComment event 245
Attachments object methods 18
AIMS_Commands function 194
Add 18
AIMS_DeleteComment event 244
Remove 19
AIMS_Properties function 195
RemoveAll 19

Confidential and Proprietary © 2021 399                                                           www.accruent.com


Attachments object properties 18 Property 35
Attachments property 118, 134 SkipCurrentDocContent 36
AttachWaitingProjectCopy method 59 TemplateName 36
attributes 34, 261, 356-357, 380 Transmittal 36
audit log BriefCase property 46, 143
custom events 172 briefcases 21, 35, 46, 143, 248, 361
AutoCAD 1, 32, 52, 207, 225, 362-363, 380
AutoDocumentType property 99 C
automatically generated messages 350 CAD link events 260, See also events, CAD link
automation objects 352 CalculateFileType method 59
CallRemote method 60, 173
B CanEditProperty property 46
batch events 233 ChangeDocumentType method 61
Batch object methods 24 ChangeFolderType method 105
Abort 24 ChangeForgeURL method 61
AddDocuments 24 ChangeManager method 62
FailCurrent 29 ChangeTodoPerson method 62
Batch object properties 20 ChangeWorkflowState method 63
Argument(Name) 20 Clean method 119, 135, 154
BatchIndex 22 Clear method
BatchSize 22 Roles object 146
CountFailed 23 clearing property values of copied
CountSucceeded 23 documents 349
IsFirstInBatch 23 ClearRedlines method 63
IsLastInBatch 23 Client object methods 41
ProcessAsBatch 23 GoTo 41
BatchIndex property 22 GoToView 42
BatchSize property 22 Log 42
BeginBatch method 126 NewMailMessage 43
blocks 6, 11, 230-231, 261, 330, 373, 380 OpenInApplication 43
breakpoints 11 Refresh 44
briefcase events 248, See also events, briefcase Client object properties 38
Briefcase object methods 37 Argument(Name) 38
Archive 37 ClientID 39
GenerateTransmittalSheet 37 ClientProductCode 39
Briefcase object properties 35 Confirmation(Action) 40
MailMessage 35 CurrentScope 40
Path 35 CurrentView 40

Confidential and Proprietary © 2021 400                                                           www.accruent.com


ImportDetails 41 AS_IMPORTTYPE 41, 50, 288, 317, 347
ImportType 41, 50 AS_LOG_FLAGS 43
Type 41 AS_LOGFLAGS 347
Viewer property 41 AS_MAPIMSG_RECIP_TYPE 121, 123, 347
ClientID property 39 AS_MAPIMSG_SEND_FLAGS 119, 135, 347
ClientProductCode property 39 AS_MOVE_OPTIONS 77, 347
codes, RTF 357 AS_MsgBoxResult 347
ColumnsInfo property 152 AS_MsgBoxStyle 229, 347
command identifiers 360 AS_NEWFOLDER_OPTIONS 108, 111, 347
commands, custom 266 AS_PCLOCK 347
CommitBatch method 128 AS_PRIVILEGES 347
components 362-363 AS_PROJITEM_FLAGS 347
ComposeURL method 174 AS_PROP_CMD 289, 347
ConcurrentEngineeringRule property 46 AS_PWF_STATUS 347
ConfigKeywords property 86 AS_REFRESHFLAG 347
configuration 1, 6, 9-10, 15, 32, 52, 126, 143, AS_REFRESHFLAGS 44
230-231, 237, 338, 347, 349, 356, 364 AS_SUBMITTAL_STATUS_FLAGS 347
configuration expressions (VBScript) 6, 15 AS_SUBMITTAL_STATUS_VALUES 347
Confirmation(Action) property 40 AS_TQTYPE 139, 153, 347
ConfirmMerged method 64 AS_TRANSMITTAL_STATUS_FLAGS 347
ConfirmSuperceded method 64 AS_TRANSMITTAL_STATUS_VALUES 348
connection string 175 AS_URL_FLAGS 174, 348
ConnectionString option 353 AS_USER_COLUMNS 348
constants 193 AS_WA_STATEFLAG 348
AS_BRC_IMPORT_ACTION 250, 254, 346 AS_WATERMARK_COLORS 348
AS_CALLREMOTE_FLAGSS 346 AS_WATERMARK_STYLES 348
AS_CE_RULE 346 AS_WATERMARK_TITLE_STYLES 348
AS_CI 346 AS_WF_STATE 63, 312, 348, 350
AS_CLIENTID 346 AS_WFINTERLOCK_LOCATION 348
AS_CMD_MODE 266, 346 AS_WORKFLOW_STATE_TYPE 190, 348
AS_CMD_STATE 346 AS_WORKFLOW_TRANS_RES 70, 348
AS_CMD_STATUS 267 IC_OPERATOR 348
AS_CONFIRM_ACTION 40, 346 IC_SHOWWINDOW 348
AS_CONFIRM_NO_ constants, AS_WF_STATE 104
SELECTPROJECTWIZARD 288
ContentFromReport method 64
AS_GROUP_COLUMNS 346
ConvertToProject method 106
AS_HYBRID_ACTION 295-296, 347
CopyProperties method 65, 106
AS_IMPORT_DETAILS 41
AS_IMPORTDETAILS 347

Confidential and Proprietary © 2021 401                                                           www.accruent.com


Count property 185 DeleteAssignment method
MailRecipients object 122 Roles object 146
References object 140 DeleteHotspots method 67
CountFailed property 23 DeleteHybridPart method 67
CountSucceeded property 23 DeleteRendition method 67
Created property 47, 99 DeleteValues method 154
CreatedBy property 47, 100 DeleteValuesEx method 154
CreateHybridPart method 66 Description property 163
CreateNewRevision property 191 destination vaults 334
CreateObject function 352 DetachFromMaster method 137
CreateWaitingProjectCopy method 63 DisplayName property 143, 191
creating DocumentType object 86
automation objects 352 Query object 138
custom functions 230 Scope object 148
event procedures 236 Table object 152
CurrentScope property 40 Vault object 175
CurrentView property 40 Workflow object 187
CurrentWorkArea property 168 WorkflowState object 189
custom client extensions 9 DocSync_Failed event 333
custom command events 266, See also events, DocSync_Options event 333
custom command DocSync_Succeeded event 333
custom functions 230 document copy/move events 271, See
customization 1, 7, 9, 12, 20, 35, 46, 63, 99, 118, also events, document copy/move
122, 126, 131, 138, 140, 145, 163, 167, 169, document generic events See also events,
194, 230-231, 236, 260, 266, 295, 310, 316, document generic
330, 349, 353
DocGenericEvent_BeforeNewDocument
CWFManagers property 47 event 349
CWFState property 47 document hybrid events 295, See also events,
CWFTodoPersons property 48 document hybrid
Document object 45
D Document object methods 58
date properties 350 AddReorderingComment 58
DBConnection property ApplyPropertyValues 59
Query object 138 AttachWaitingProjectCopy 59
Table object 152 CalculateFileType 59
DebugAssert function 214 CallRemote 60, 173
debugging 10, 14 ChangeDocumentType 61
Delete method 66, 107, 141 ChangeForgeURL 61
ChangeManager 62

Confidential and Proprietary © 2021 402                                                           www.accruent.com


ChangeTodoPerson 62 SaveToFile 80-81
ChangeWorkflowState 63 SetModified 81
ClearRedlines 63 StartChange 82
ConfirmMerged 64 StartWorkflow 82
ConfirmSuperceded 64 Subscribe 83
ContentFromReport 64 UnlockLWS 84
CopyProperties 65 UnlockMasterDocument 84
CreateHybridPart 66 Unsubscribe 83
CreateWaitingProjectCopy 63 UpdateRendition 84
Delete 66 Document object properties 46
DeleteHotspots 67 BriefCase 46, 143
DeleteHybridPart 67 CanEditProperty 46
DeleteRendition 67 ConcurrentEngineeringRuleProperty 46
ExecTransition 68 Created 47
ExportRendition 69 CreatedBy 47
GetExpectedTransitionResult 70 CWFManagers 47
GetHybridPart 70 CWFState 47
GetLog 71 CWFTodoPersons 48
GetNavigationViewPath 71 DocumentType 48
GetReferences 72 FileName 48, 143
HasHotspots 72 FileType 48
HybridMainDocument 73 GlobalId 49
ImportHybridPart 73 HasIncomingReferences 49
LinkToMaster 74 HasOutgoingReferences 49
LoadFromFile 74 HasRedlines 49
LoadFromTemplate 75 HasRendition 50
LockLWS 75 HasRenditionRedlines 50
LockMasterDocument 75 HybridParts 50
Log 76 ImportType 41, 50
Migrate 76 IsChangedByPortal 51
MoveTo 77 IsUnderRevision 51
ReassignManagers 77 IsUniqueValue(PropertyName, Value) 52
ReassignTodoPersons 78 LayoutsNames 32, 52
ReleaseChange 78 LockingProjectCopy 53
Reroute 79 MasterDocument property 53
ResetPropertyValues 79 Modified 53
RevokeChange 80 ModifiedBy 53
RevokeWorkflow 80 ParentFolder 53

Confidential and Proprietary © 2021 403                                                           www.accruent.com


ParentProject 54 Sequence(Name) 87
Path 54 DocumentType property 48
ProjectCopy 54 DocumentTypes property
Property(Name) 54, 185 Scope object 148
Rendition 54
Revision 55 E
ShareID 55 editing event procedures 236
Size 55 email
StatusText 56 automatically generated messages 350
UnderRevisionBy 56 EmailAddress property 163
VersionID 56 error messages 8, 14, 148, 234, 239, 285, 306,
WorkFlowAction 56 339, 352, 356, 363, 376
WorkFlowManager 56 event handler 11, 231, 258, 285, 336
WorkflowState 57 event procedures 231
WorkFlowState 104 command identifiers 360
WorkFlowTodoPerson 57 creating and editing 236
Document property 185 events
Document shortcut menu 363 DocSync_Failed 333
document type workflow events 310, See DocSync_Options 333
also events, document type workflow DocSync_Succeeded 333
document types 30, 48, 61, 86, 176, 206, 239, limiting generated events 237
273, 281, 300, 314, 364
names of 232
document working copy events 314, See
also events, document working copy order of 234
DocumentCount property 143 PublisherDestinationEvent_AfterPublish 334
DocumentID property 131 PublisherDestinationEvent_
HotspotUpdated 335
documents
PublisherSourceEvent_AfterPublish 336
CAD link events 260
PublisherSourceEvent_BeforePublish 335
clearing property values of copied
documents 349 events, briefcase 248
copy/move events 271 BrcEvent_AfterCreateTransmittal 250
generic events 278 BrcEvent_AfterImport 250
hybrid events 295 BrcEvent_AfterInclude 251
working copy events 314 BrcEvent_AfterOpen 251
Documents property 185 BrcEvent_AfterReadProperty 252
DocumentType object properties 86 BrcEvent_AfterSend 252
ConfigKeywords 86 BrcEvent_BeforeClose 253
DisplayName 86 BrcEvent_BeforeCreate 253
InternalName 86 BrcEvent_BeforeImport 254

Confidential and Proprietary © 2021 404                                                           www.accruent.com


BrcEvent_BeforeInclude 254 DocCopyMoveEvent_
BrcEvent_BeforeIncludeFile 255 *BeforeCopyWithReferences 273
BrcEvent_BeforeOpen 256 DocCopyMoveEvent_*Copy 274
BrcEvent_BeforeSend 256 DocCopyMoveEvent_*Derive 274
BrcEvent_BeforeWriteFileProperty 257 DocCopyMoveEvent_*Move 274
BrcEvent_BeforeWriteProperty 257 DocCopyMoveEvent_*PrepareCopy 275
BrcEvent_MatchDocument 258 DocCopyMoveEvent_*Replace 276
BrcEvent_Unlocked 259 events, document generic 278
events, CAD link 260 DocGenericEvent_
*AfterCreateReference 281
DocCADLink_*UpdateProperties 264
DocGenericEvent_
DocCADLink_*UpdateReferences 265 *AfterDeleteReference 281
DocCADLink_AfterReadProperty 261 DocGenericEvent_*AfterEditRedlines 282
DocCADLink_BeforeWriteProperty 262 DocGenericEvent_*AfterReplaceContent 282
DocCADLink_OnUpdateReference 264 DocGenericEvent_
events, custom command 266 *BeforeCreateReference 283
<CommandName>_Execute 268 DocGenericEvent_
<CommandName>_Initialize 267, 269 *BeforeDeleteReference 283
<CommandName>_State 266 DocGenericEvent_*BeforeEditRedlines 284
<CommandName>_Terminate 269-270 DocGenericEvent_
*BeforeReplaceContent 284-285
events, DocProjectCopy 298
DocGenericEvent_*CalculateFilename 286
events, DocProjectCopyEvent_
DocGenericEvent_
*ConfirmMerged 304
*ChangeDocumentType 286
*ConfirmSuperseded 305
DocGenericEvent_*Delete 286
*DiscardFromProject 305
DocGenericEvent_*NewDocument 288
*ReleaseToMaster 308
DocGenericEvent_*OnProperties 289
*RequireMerge 308
DocGenericEvent_*OpenInApplication 290
*UndoMakeObsolete 309
DocGenericEvent_*PrepareForOffline 291
AfterDetachFromMaster 302
DocGenericEvent_*Print 292
AfterLinkToMaster 300
DocGenericEvent_*Rename 292
AfterMasterUpdate 301
DocGenericEvent_*UpdateThumbnail 293
AfterTransferToNext 301
DocGenericEvent_
BeforeDetachFromMaster 304 DocumentFolderSelected 287
BeforeLinkToMaster 302 DocGenericEvent_PrepareCommand 291
BeforeMasterUpdate 303 events, document hybrid 295
BeforeTransferToNext 303 DocHybridEvent_*AfterHybridPart 295
events, document copy/move 271 DocHybridEvent_*BeforeHybridPart 296
DocCopyMoveEvent_ DocHybridEvent_*InitializeHybridParts 296
*AfterCopyWithReferences 272
DocHybridEvent_AfterConvert2Hybrid 297

Confidential and Proprietary © 2021 405                                                           www.accruent.com


DocHybridEvent_BeforeConvert2Hybrid 296 ExecSQL method 175
events, document type workflow 310 ExecTransition method 68, 107
AfterReplaceReleased 313 Exist(DocID) property 140
DocWorkFlowEvent_ export package events 319
*ChangeWFManager 311 export packages
DocWorkFlowEvent_*ChangeWFPerson 311 events 319
DocWorkFlowEvent_*ChangeWFState 312 ExportRendition method 69
DocWorkFlowEvent_*RevokeWF 312 extensions 9, 21, 43, 130, 161, 215-216, 246, 253
events, document working copy 314 ExtractTags method 69
DocWorkingCopyEvent_*CreateWC 315
DocWorkingCopyEvent_*RevokeWC 315 F
DocWorkingCopyEvent_*SubmitWC 315
FailCurrent method 29
events, export package 319
Feedback property 131
events, folder generic 316
Field-Path definition 77, 99
FolderGenericEvent_*AfterNewFolder 317
FileExtension function 215
FolderGenericEvent_*BeforeNewFolder 317
FileName property 48, 143
FolderGenericEvent_*ChangeFolder 318
FilePath property (Attachment object) 17
events, ProjectWorkflowEvent_
FileRoot function 216
*DiscardFromProject 323
FileType property 48
*ExecuteTransition 323-324
FindDocuments method 176
BeforeExpandItem 324
folder generic events 316, See also events,
InitializeExpandItem 327 folder generic
InitializeWizard 327 Folder object methods 105
PrepareBrowser 328 ApplyPropertyValues 105
TerminateWizard 329 ChangeFolderType 105
events, property page 330 ConvertToProject 106
<PageName>Page_CanApply 331 CopyProperties 106
<PageName>Page_CanEdit 331 Delete 107
<PageName>Page_IsVisible 330 GetSubFolder 108
events, vault 338 GetSubFolderNames 109
VaultEvent_ChangeView 340 GetUsersWithRole 109
VaultEvent_Close 340 LinkToPortal 110
VaultEvent_Open 341 MoveTo 110
events, workflow definition 342 NewFolder 111
DocCWFEvent_*ExecuteTransition 343 ResetPropertyValues 113
DocCWFEvent_*NewRevision 345 UnlinkFromPortal 113
DocCWFEvent_*Reroute 345 Folder object properties 99
DocCWFEvent_InitializeWizard 344 Created 99

Confidential and Proprietary © 2021 406                                                           www.accruent.com


CreatedBy 100 GetPropertyNames method 180
HasDocuments 100 GetReferences method 72
IsProject 100 GetSubFolder method 108
IsUniqueValue (PropertyName, Value) 100 GetSubFolderNames method 109
LinkedProjectID 101 GetUsers method 181
ParentFolder 101 GetUsersWithRole method 109
ParentProject 102 GetValues method 139, 155
Path 102 GetValuesEx method 139, 157
ProjectTypeDisplayName 102 global variables 354
ProjectTypeName 102 GlobalId property 49
Property(Name) 102 GMTTime2Local function 220
Sequence(Name) 103 GoTo method 41
ShareID 103 GoToView method 42
TypeDisplayName 103
TypeName 104 H
WorkflowManagers 104 HasConcurrentPCs property 136
WorkflowStatus 104 HasDocuments property 100
folder types 99, 105 HasFeature(Feature) property 168
Format property 144 HasHotspots method 72
FormatSequenceAlfa function 217 HasIncomingReferences property 49
FormatSequenceAlfaNum function 218 HasOutgoingReferences property 49
FormatSequenceNum function 219 HasPrivilege(Privilege, [Object]) property 164
formatting text 357 HasRedlines property 49
FullName property 164 HasRendition property 50
functions HasRenditionRedlines property 50
CreateObject 352 HasRole(Role, [Object]) property 164
custom 230 HybridMainDocument method 73
VBScript 193 HybridParts property 50

G I
GenerateTransmittalSheet method 37 ID property 50, 89, 100, 114, 116
GetDistinctValues method 179 ImportDetails property 41
GetDocument method 179 ImportHybridPart method 73
GetExpectedTransitionResult method 70, 107 ImportType property 41, 50
GetGroups method 180 InheritedFromParent property
GetHybridPart method 70 Roles object 145
GetLog method 71 Initials property 165
GetNavigationViewPath method 71 installation 10, 14

Confidential and Proprietary © 2021 407                                                           www.accruent.com


Interlock method 110 M
InternalName property MailMessage object methods 119
DocumentType object 86 Clean 119
IsActive property 136 Send 119
IsChangedByPortal property 51 MailMessage object properties 118
IsFirstInBatch property 23 Attachments 118
IsLastInBatch property 23 NoteText 118
IsPreview property 184 Originator 118
IsProject property 100 Recipients 118
IsRendition property 184 Subject 119
IsUnderRevision property 51 MailMessage property 35
IsUniqueValue (PropertyName, Value) MailRecipient object properties 120
property 100
Address 120
IsUniqueValue(PropertyName, Value)
property 52 Type 121
MailRecipients object methods 122
J Add 122
Remove 123
JobCode property 131
RemoveAll 124
MailRecipients object properties 122
L
Count 122
LayoutsNames property 32, 52 Recipient(Index) 122
licenses 173, 362, 376 Manager property 165
limiting generated events 237 MasterDocument object 125
LinkedProjectID property MasterDocument property 53
Folder object 101 MasterLocked property 136
LinkToMaster method 74 Meridian API constants 346
LinkToPortal 110 Meridian Enterprise
ListFromColumn function 221 Meridian object model 16
LoadFromFile method 74 Meridian Enterprise Script Editor 6
LoadFromTemplate method 75 MeridianQueue object 126
LocalTime2GMT function 222 MeridianTask object 131
LockingProjectCopy property 53 message boxes 357
LockLWS method 75 messages, automatically generated 350
LockMasterDocument method 75 methods
log files 10, 42, 62, 107, 172, 344, 365, 379 BeginBatch 126
Log method 42, 76 CommitBatch 128
ExecTransition 107

Confidential and Proprietary © 2021 408                                                           www.accruent.com


GetExpectedTransitionResult 107 Briefcase 35
Interlock 110 Client 38
RegisterDocument 128, 377 Document 46
Reroute 112 DocumentType 86
RevokeBatch 130 Folder 98
Microsoft Script Debugger 14 MailMessage 118
Migrate method 76 MailRecipient 120
Modified property 53 MailRecipients 122
ModifiedBy property 53 MasterDocument 125
Moment property 168 NewMailMessage 134
Move method 186 ProjectCopy 136, 185
MoveTo method 77, 110 Query 138, 145
References 140
N Sequence 150
Name property Table 152
Scope object 17, 89, 101, 114, 116, 120, 138, Task 161
149, 152, 165, 168, 187, 189, 191 User 163
NewFolder method 111 Vault 167
NewMailMessage method 43 Viewer 184
NewMailMessage object methods 135 Workflow 187
Clean 135 WorkflowState 189
Send 135 WorkflowTransition 191
NewMailMessage object properties 134 objects, automation 352
Attachments 134 OpenInApplication method 43
NoteText 134 Option property
Originator 134 Vault object 169
Recipients 134 order of events 234
Subject 135 OrganizationalUnit property 165-166
Next(StartAt) property 150 Originator property 118, 134
NoteText property 118, 134
P
O ParentFolder property 53, 101
object arguments 354 ParentProject property (Folder object) 54, 102
Object Browser 7, 16, 346 Path property
object model 16 Briefcase object 35
objects Document object 54
Attachment 17 Folder object 102
Batch 20 Vault object 169

Confidential and Proprietary © 2021 409                                                           www.accruent.com


PnIDLink_GetAssetCoordinates function 223 documents 349
PnIDLink_GetSheetSize function 224 setting based on workflow transitions 350
PnIDLink_IsMainDrawing function 225 validating unique 349
PowerUser 14 Property(Name) property 54, 102, 185
PreventDuplicate property 132 PublisherDestinationEvent_AfterPublish
Priority property 186 event 334
ProcessAsBatch property 23 PublisherDestinationEvent_HotspotUpdated
event 335
project workflows
PublisherSourceEvent_AfterPublish event 336
events 322
PublisherSourceEvent_BeforePublish event 335
ProjectCopy object 136, 185
publishing jobs
ProjectCopy object methods
options 377
DetachFromMaster 137
publishing options
RequireMerge 137
_CDWF_ 377
UndoMakeObsolete 137
_DATAONLY_ 377, 382
ProjectCopy object properties
_LIB_ 377
HasConcurrentPCs 136
_NOREDLINES_ 377
IsActive 136
_PAGERANGE_ 382
MasterLocked 136
_RETIRE_ 380-381
ProjectCopy property 54
_RETRY_ 381
ProjectTypeDisplayName property 102
_SITE_ 381
ProjectTypeName property 102
publishing options, _DATAONLY_ 377
properties i, 1, 4, 7, 9, 15-18, 20-21, 32, 35, 38-
39, 46, 59, 63, 86, 88, 98-99, 105-106, 114, publishing options, _RETRY_ 378, 381
116, 118, 120, 122, 125, 129, 131, 134, 136, PublishOptions property 132
138, 140, 143, 145, 148, 150, 152, 163-164,
167-168, 184-185, 187, 189, 191, 193, 195-
Q
196, 199, 203, 206-208, 210-211, 213, 231,
234, 236-237, 240, 247-248, 260, 276, 288, Query object methods 139
313, 320, 325, 330, 334, 339, 343-344, 346,
GetValues 139
349, 352-356, 361-364, 369-373, 377
GetValuesEx 139
properties, specific names of
Query object properties 138
PreventDuplicate 132
DBConnection 138
PublishOptions 132
DisplayName 138
RenderOptions 132
Type 139
RevisionID 132
Query(Name) property 169
UserName 133
Quote function 226
property page events 330
QuoteChar property 144
Property property 35
property values
clearing property values of copied

Confidential and Proprietary © 2021 410                                                           www.accruent.com


R RevokeWorkflow method 80
ReassignManagers method 77 roles 109, 164
ReassignTodoPersons method 78 Roles object methods 146
Recipient(Index) property 122 Roles object properties 145
Recipients property 118, 134 AddAssignment 146
References object methods 141 Assignments 145
Add 141 Clear 146
Delete 141 DeleteAssignment 146
Refresh 142 InheritedFromParent 145
References object properties 140 RootFolder method 181
Count 140 RootFolder property
Exist(DocID) 140 Scope object 149
Target(Item) 140 Vault object 169
Refresh method 44, 142 RootURL property 170
RegisterDocument method 128, 377 RTF codes 357
ReleaseChange method 78 RunShellCommand method 182
Remove method 19, 123, 186
S
RemoveAll method 19, 124
RenderOptions property 132 SaveToFile method 80-81
Rendition property 54 Scope object 148
Report object properties Scope object methods 148
BriefCase 46, 143 Scope object properties
DisplayName 143 DisplayName 148
DocumentCount 143 DocumentTypes 148
FileName 48, 143 Name 17, 89, 101, 114, 116, 120, 138, 149,
Format 144 152, 165, 168, 187, 189, 191
QuoteChar 144 RootFolder 149
SepChar 144 Scope property 170
VaultName 144 Script Editor 6
RequireMerge method 137 script examples 349
Reroute method 79, 112 scripts
Reset method 161 Meridian Enterprise Script Editor 6
ResetPropertyValues method 79, 113 Object Browser 7
Revision property 55 security i, 1, 9-10, 103, 109, 145, 164, 339, 352
RevisionID property 132 Send method 119, 135
RevokeBatch method 130 SendNotification method 182
RevokeChange method 80 SepChar property 144

Confidential and Proprietary © 2021 411                                                           www.accruent.com


Sequence object methods 150 UpdateValues 159
SetTo 150 UpdateValuesEx 159
Sequence object properties 150 Table object properties 152
Next(StartAt) 150 ColumnsInfo 152
Value 150 DBConnection 152
Sequence(Name) property DisplayName 152
DocumentType object 87 Type 153
Folder object 103 Table(Name) property 171
Vault object 170 Target(Item) property 140
ServerName property 170 TargetState property 192
ServerProductCode property 171 Task object methods 161
ServerTimeGMT property 171 Reset 161
Set method 161 Set 161
SetModified method 81 Submit 162
settings Task property 171
property values 350 tasks 11, 129, 133, 161, 171
SetTo method 150 technical support 5
ShareID property 55, 103 TemplateName property 36
Size property 55 text formatting 357
SkipCurrentDocContent property 36 title blocks 11, 261, 330, 380
SourceState property 192 Title property 166
SQL Server 1 TransferToNext method 125
StartChange method 82 Transition(TransitionName) property 188
StartWorkflow method 82 Transmittal property 36
State(StateName) property 188 Type property
StatusText property 56 Client object 41
Subject property 119, 135 MailRecipient object 121
Submit method 162 Query object 139
Subscribe method 83 Table object 153
WorkflowState object 190
T TypeDisplayName property 103
Table object methods 153 TypeName property 104
AddValues 153 typographic conventions 2
Clean 154
DeleteValues 154 U
DeleteValuesEx 154 UnderRevisionBy property 56
GetValues 155 UndoMakeObsolete method 137
GetValuesEx 157 unique property values 349

Confidential and Proprietary © 2021 412                                                           www.accruent.com


UnlinkFromPortal 113 RootFolder 181
UnlockLWS method 84 RunShellCommand 182
UnlockMasterDocument method 84 SendNotification 182
Unsubscribe method 83 Vault object properties 167
UpdateRendition method 84 Argument(Name) 167
UpdateValues method 159 CurrentWorkArea 168
UpdateValuesEx method 159 DisplayName 175
user accounts 181 HasFeature(Feature) 168
User object Moment 168
Title property 166 Option 169
User object properties 163, 166 Path 169
AllEmails 163 Query(Name) 169
Description 163 RootFolder 169
EmailAddress 163 RootURL 170
FullName 164 Scope 170
HasPrivilege(Privilege, [Object]) 164 Sequence(Name) 170
HasRole(Role, [Object]) 164 ServerName 170
Initials 165 ServerProductCode 171
Manager 165 ServerTimeGMT 171
OrganizationalUnit 165-166 Table(Name) 171
User(Name) property 171 Task 171
UserName property 133 User(Name) 171
WebAccessLocationID 172
V WorkIsolationMode 172
ValidateFolderName function 227 VaultName property 144
validating unique property values 349 VBScript 1, 6, 10, 14-16, 42, 88, 126, 132, 155,
175, 193-194, 197, 214, 230-231, 237, 349,
Value property (Sequence object) 150 352, 354-355, 358, 362-363, 377, 416
vault events 338, See also events, vault and Web Access 355
Vault object methods 172 configuration expressions 15
CallRemote 60, 173 debugging 10
ComposeURL 174 event procedures 231
ExecSQL 175 generated events 237
FindDocuments 176 MeridianQueue object 126
GetDistinctValues 179 MeridianTask object 131
GetDocument 179 Object Browser 7
GetGroups 180 VBScript events
GetPropertyNames 180 AIMS_AddComment 238
GetUsers 181 AIMS_CloseComment 245

Confidential and Proprietary © 2021 413                                                           www.accruent.com


AIMS_DeleteComment 244 Watermark 184
AIMS_UpdateComment 245 Viewer property (Client object) 41
VBScript examples 349 Visual Studio 10
VBScript functions
AMCreateObject 197 W
AMMGetCustomColumnHeaders 198 WaitingList object methods
AMMGetCustomColumnValues 199 Move 186
AMMGetReportCustomHeaderValues 202 Remove 186
AMMGetReportTableRowValues 203 TransferToNExt 125
AMMMainTagDocumentId 206 WaitingList object properties
AMMPropertiesToBeRequested 207 Count 185
AMMTags4TagPageIsVisible 208 Document 185
AMMTagsManageLinksIsAllowed 209 Documents 185
AMMTagsPageIsVisible 210 Priority 186
AMMUseMainTag 211 Watermark property 184
AMMWhereUsedManageLinksIsAllowed 212 Web Access
AMMWhereUsedPageIsVisible 213 and VBScript 355
DebugAssert 214 web services 126
FileExtension 215 WebAccessLocationID property 172
FileRoot 216 Windows registry 12, 17, 46, 89, 101, 115, 117,
FormatSequenceAlfa 217 120, 139, 149, 153, 163, 169, 187, 189, 191
FormatSequenceAlfaNum 218 WinInputBox function 228, 357
FormatSequenceNum 219 WinMsgBox function 229, 357
GMTTime2Local 220 WorkArea object properties
ListFromColumn 221 ID 50, 89, 100, 114, 116
LocalTime2GMT 222 workflow definition events 342, See also events,
PnIDLink_GetAssetCoordinates 223 workflow definition
PnIDLink_GetSheetSize 224 Workflow object properties 187
PnIDLink_IsMainDrawing 225 DisplayName 187
Quote 226 State(StateName) 188
ValidateFolderName 227 Transition(TransitionName) 188
WinInputBox 228, 357 WorkflowState 57
WinMsgBox 229, 357 Workflow property 190, 192
VBScript objects 16 WorkFlowAction property 56
VersionID property 56 WorkFlowManager property 56
Viewer object properties 184 WorkflowManagers property 104
IsPreview 184 workflows
IsRendition 184 events 322

Confidential and Proprietary © 2021 414                                                           www.accruent.com


WorkflowState object properties 189
DisplayName 189
Type 190
Workflow 190
WorkflowState property 57
WorkFlowState property 104
WorkflowStatus property 104
WorkFlowTodoPerson property 57
WorkflowTransition object properties 191
CreateNewRevision 191
DisplayName 191
SourceState 192
TargetState 192
Workflow 192
WorkIsolationMode property
Vault object 172

Confidential and Proprietary © 2021 415                                                           www.accruent.com


MERIDIAN VERSION NAME (OVERRIDEMEINYOURTARGET) ENTERPRISE VBSCRIPT API REFERENCE – JULY 2021

Accruent, LLC
11500 Alterra Parkway
Suite 110
Austin, TX 78758
www.accruent.com

Confidential and Proprietary © 2021 416                                                           www.accruent.com

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy