Meridian2021 R2 VR LTR
Meridian2021 R2 VR LTR
2021 R2
Typographic conventions
Information
that, if not
heeded, could
result in lost
data or
accidents.
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.
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
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.
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.
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.
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.
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.
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
Add Method
Adds an attachment to the current NewMailMessage object.
Syntax
Add(FilePath As String, [Name As String])
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.
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.
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.
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.
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
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
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.
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
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.
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.
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.
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.
Parameters
Name Description
Info Text of the information.
Heading Text of the heading.
Example
See Confirmation method
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.
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.
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
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.
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.
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
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.
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.
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
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
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.
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
GoTo Method
Select the specified object. Makes the specified object the current object.
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])
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.
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.
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.
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
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
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
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
Syntax
IsChangedByPortal As Boolean
Example
This sample code releases a quick change if the document was not changed in Meridian Portal.
IsUnderRevision Property
True if a working copy exists for the current document. Read-only.
Syntax
IsUnderRevision As Boolean
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.
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
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
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
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
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
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.
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.
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
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.
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.
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.
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.
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")
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.
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()
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.
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
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.
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.
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
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).
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.
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.
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.
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])
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()
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.
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])
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)
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])
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)
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.
Remarks
An interface for this method to specify the external process has not yet been implemented.
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.
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.
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.
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
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
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.
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.
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.
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()
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.
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.
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
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
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
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
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
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
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).
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")
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
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.
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.
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])
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.
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.
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.
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.
ImportProfile Property
Gets the ImportProfile object that is assigned to the current ImportPackage object.
Syntax
ImportProfile As Object
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.
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
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
Syntax
Subject As String
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.
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.
Syntax
Type As AS_MAPIMSG_RECIP_TYPE
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
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
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.
Syntax
RemoveAll()
Parameters
This method accepts no parameters.
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.
If Document.ParentProject.Project_AutoTransfer Then
MasterDoc.TransferToNext
End If
End Sub
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.
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
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)
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.
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.
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
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
Syntax
UserName As String
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
Syntax
Subject As String
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.
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
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.
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
Type Property
The type of the query as one of the AS_TQTYPE constants. Read-only.
Syntax
Type As AS_TQTYPE
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.
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
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).
Syntax
Refresh
Parameters
This method accepts no parameters.
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
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
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.
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.
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.
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.
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)
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
SetTo Method
Set the current sequence to a new number.
Syntax
SetTo(Number)
Name Description
Number Long integer with which to set the sequence.
Return Value
The new (Long) number.
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
Type Property
The type of the table as one of hte AS_TQTYPE constants. Read-only.
Syntax
Type As AS_TQTYPE
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.
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.
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"), _
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.
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)
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.
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.
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.
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
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.
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
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
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.
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.
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
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
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
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
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
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.
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:
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
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
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:
equals IC_OP_DATE_EQUALS
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.
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
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
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
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
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)
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.
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
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
Syntax
Priority As Long
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.
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.
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.
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.
Syntax
Type As AS_WORKFLOW_STATE_TYPE
Workflow Property
The parent workflow object. Read-only.
Syntax
Workflow As IASWorkflow
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
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
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")
Sub Do_ButtonA()
Document.Area1= "A"
Document.ChangeManagementRemarks = "Option A chosen"
Document.Log "Button A clicked at : " & CStr(Vault.ServerTimeGMT)
End Sub
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")
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
AIMS_UpdateChangeManagement = ""
End Function
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.
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.
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
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
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
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
Remarks
Called for every asset in the drawing.
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.
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
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
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
Remarks
Called for every asset in the drawing.
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))
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_.
Syntax
Function AMMTags4TagPageIsVisible ()
Parameters
This function accepts no parameters.
Example
Function AMMTags4TagPageIsVisible ()
AMMTags4TagPageIsVisible = InStr(1, Document.FileName, "object") =
1
End Function
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.
Syntax
Function AMMTagsPageIsVisible ()
Parameters
This function accepts no parameters.
Example
Function AMMTagsPageIsVisible ()
AMMTagsPageIsVisible = InStr(1, Document.FileName, "DWG") = 1
End Function
Syntax
Function AMMUseMainTag()
Parameters
This function accepts no parameters.
Example
Function AMMUseMainTag()
AMMUseMainTag = True
End Function
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.
Syntax
Function AMMWhereUsedPageIsVisible()
Parameters
This function accepts no parameters.
Example
Function AMMWhereUsedPageIsVisible()
AMMWhereUsedPageIsVisible = InStr(1, Document.FileName, "DWG") = 1
End Function
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.
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.
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.
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.
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.
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.
Syntax
GMTTime2Local(GMTTime As Date) As Date
Parameters
Name Description
GMTTime A date expressed in GMT.
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.
Syntax
LocalTime2GMT(LocalTime As Date) As Date
Parameters
Name Description
LocalTime A date expressed in the local time zone of the computer.
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.
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.
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.
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.
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.
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 ("").
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.
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.
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
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
' 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.
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_GetQueryStringValue = ""
End Function
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
' 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_After = Array(False, "Some reason to stop the
upload")
Exit Function
End If
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
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)
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
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.
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
Notes
1. Once for each document in the briefcase.
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.
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.
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.
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,
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)
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.
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.
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.
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.
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.
Notes
1. Once for each property.
Notes
1. Once for each property.
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)
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
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.
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
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.
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.
<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.
<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)
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.
<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.
Syntax
<CommandName>_Terminate(Batch)
Parameters
Name Description
Batch An object that represents the batch of documents the user has selected.
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.
DocCopyMoveEvent_*AfterCopyWithReferences Event
Occurs after documents are copied with references.
Syntax
DocCopyMoveEvent_AfterCopyWithReferences(Batch, SourceDocument,
OldParentDocument, NewParentDocument)
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.
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)
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)
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.
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.
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])
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)
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])
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)
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.
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)
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.
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.
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.
AS_PROP_CMD
constants
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)
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)
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.
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.
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.
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.
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)
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.
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.
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.
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.
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.
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.
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.
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.
Examples
Following are example implementations of this event.
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)
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.
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.
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.
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
Notes
1. In PowerWeb only if the Accruent Upload/Download Control option Open in application is enabled
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.
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.
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.
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
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.
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
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.
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)
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
Function ProjectWorkflowEvent_BeforeExpandItem(SubItems)
lLevel = UBound (Split (Folder.Path, "\"))
Case 2 'Splits
For i = LBound (SubItems) To UBound (SubItems)
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.
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
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.
<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.
<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.
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
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()
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 & "'" & _
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.
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)
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
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)
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)
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.
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.
Notes
1. Occurs in PowerUser only.
2. Occurs in PowerWeb only.
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.
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.
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.
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
Note:
Date properties do not accept string values. Therefore, instead of setting them to vbNullString, set them
to Null.
'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
'Body text
oMessage.NoteText = "The body text of the message"
'Attachments
oMessage.Attachments.Add "c:\temp\my.bmp", ""
Dim XLApp
End Function
An error occurs if the specified remote computer does not exist or cannot be found, for example, because
of security restrictions.
Dim cn, rs
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
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.
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
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"
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
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.
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.
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
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.
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.
Example
Dim TagCollection
Dim ResCode
Dim Tag
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.
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.
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
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
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
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.
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.
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
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
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.
_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.
End If
_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.
The rendering modules support the options described in the following table.
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;>_
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.
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
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.
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.
document type
A classification of documents that share one or more document management
characteristics such as format, purpose, or security.
document view
A view of a Meridian Explorer repository that displays documents.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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
Accruent, LLC
11500 Alterra Parkway
Suite 110
Austin, TX 78758
www.accruent.com