Property Page Events

Property page events allow you to implement custom functionality for the following system-defined property pages:

  • Document — the default property page for every document

  • ExportPackages — shows the Meridian Explorer export packages related to the document

  • Folder — the default property page for every folder in the Explorer view

  • ImportPackages — shows the Meridian Explorer import packages related to the document

  • Objects — shows the asset tag objects related to the document

  • Rendition — shows the properties in the BCRenditionPropertySet property set

  • Retention — shows the properties in the AMRetentionControlPropertySet property set

  • TitleBlocks — shows the values of title block attributes when multiple layouts exist in a drawing and the Synchronize the title blocks in all layouts option is enabled

  • WhereUsed — shows the documents related to the current asset object

ClosedSystem Property Page Event Sequence

The events that occur for the system property pages are shown in the following list in the sequence that they occur.

  • <PageName>Page_IsVisible

  • <PageName>Page_CanEdit

  • <PageName>Page_CanApply(Context)

Closed<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.

Example

Function ExportPackagesPage_IsVisible()
    If Not Document Is Nothing Then
        'Add your code for document objects
        ExportPackagesPage_IsVisible = True
    ElseIf Not Folder Is Nothing Then
        'Add your code for folder objects
    End If
End Function

Closed<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).

Closed<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.

Remarks

If you use this event for the Retention or Rendition property pages, you do not need to show your own dialog box (WinMsgBox function) for validation errors. Instead, you can raise an error as in the following example, and it will be shown by the property page accordingly.

err.Raise vbObjectError, "RetentionPage_CanApply", "Invalid value for EXPIRATIONDATE"

You can also use this event to validate the property values that are mapped to attributes in the title blocks in multiple layouts of a drawing. The name of the event for the Title Blocks page is TitleBlocksPage_CanApply (no spaces). The DocGenericEvent_OnProperties event occurs after this event.

Example

Function TitleBlocksPage_CanApply(Context)
    If Not Document Is Nothing Then
        If IsArray(Context) Then
            Dim s
            s = "Layout = " + CStr(Context(0)) + ", "
            s = s + "Block = " + CStr(Context(1)) + ", "
            s = s + "Property = " + CStr(Context(2)) + ", "
            s = s + "Old value = " + CStr(Context(3)) + ", "
            s = s + "New value = " + CStr(Context(4))
            If UCase(CStr(Context(4))) = LCase(CStr(Context(4))) Then
                TitleBlocksPage_CanApply = True
                s = s + ": VALID"
            Else
                TitleBlocksPage_CanApply = False
                s = s + ": INVALID"
            End If
            WinMsgBox s
        End If
     End If
 End Function

2023