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.
The events that occur for the system property pages are shown in the following list in the sequence that they occur.
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
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).
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
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