CAD Link Events
CAD link events allow you to customize the behavior of the links to the various applications that Meridian supports. These events occur when the link commands are run from within the Meridian client applications and when the link commands are run from within the linked applications.
CAD Link Event Sequences
The events that occur for the application link commands are shown in the following lists in the sequence that they occur.
Synchronize properties from file event sequence
-
DocCADLink_AfterReadMTBProperties
-
DocGenericEvent_PrepareCommand
-
DocCADLink_InitializeUpdateProperties
-
DocCADLink_BeforeUpdateProperties
-
DocCADLink_AfterReadProperty — Once for each property.
-
DocCADLink_AfterUpdateProperties
-
DocCADLink_TerminateUpdateProperties
Synchronize properties to file event sequence
-
DocCADLink_BeforeWriteMTBProperties
-
DocCADLink_InitializeUpdateProperties
-
DocCADLink_BeforeUpdateProperties
-
DocCADLink_BeforeWriteProperty — Once for each property.
-
DocCADLink_AfterUpdateProperties
-
DocCADLink_TerminateUpdateProperties
Synchronize references from file event sequence
-
DocCADLink_InitializeUpdateReferences
-
DocCADLink_BeforeUpdateReferences
-
DocCADLink_AfterUpdateReferences
-
DocCADLink_TerminateUpdateReferences
AfterReadProperty Event
Occurs after a document property that is mapped to a title block attribute is read.
Syntax
DocCADLink_AfterReadProperty(Batch, PropertyName, Value)
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.
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 For Each row in rowCollection For Each colDef In allColDefs If Not IsNull(row.Property(colDef.Name).Value) Then WinMsgBox "AfterReadMTB_Layout: " & _ row.Property( "Layout").Value & vbCrLf & _ "Property: " & CStr(colDef.Name) & vbCrLf & _ "Value: " & CStr(row.Property(colDef.Name).Value) End If Next Next End Sub
BeforeWriteProperty Event
Occurs before a document property that is mapped to a title block attribute is written.
Syntax
DocCADLink_BeforeWriteProperty(Batch, PropertyName, Value)
Name | Description |
---|---|
Batch |
An object that represents the batch of documents the user has selected. |
PropertyName |
A string that contains the property name that will be written to. |
Value |
The property value that will be written. |
Remarks
The Document object is available during this event but is read-only.
BeforeWriteMTBProperties Event
Occurs before a document property that is mapped to multiple title block attributes is written.
Syntax
DocCADLink_BeforeWriteMTBProperties (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_BeforeWriteMTBProperties(Batch, MTBProperties) Document.Log "BeforeWriteMTBProperties -->" Dim rowCollection, allColDefs, colDef, row Set allColDefs = MTBProperties.GetColumnDefs(2) Set rowCollection = MTBProperties.Rows For Each row in rowCollection For Each colDef In allColDefs If Not row.Property(colDef.Name) Is Nothing Then Dim rv: rv = "AfterReadMTB_Layout: " & _ row.Property("Layout").Value & vbCrLf & _ "Property: " & CStr(colDef.Name) & vbCrLf & _ "Value: " & CStr(row.Property(colDef.Name).Value) Document.Log rv End If Next Next End Sub
OnUpdateReference Event
Occurs when a specific reference to or from the selected documents is updated.
Syntax
DocCADLink_OnUpdateReference(Batch, RefFile, IsCreated, ToFile)
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. |
*UpdateProperties Events
Occurs when document properties that are mapped to title block attributes are synchronized.
Syntax
DocCADLink_*UpdateProperties(Batch, ToFile)
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. |
*UpdateReferences Events
Occur when references to and from the document are updated.
Syntax
DocCADLink_*UpdateReferences(Batch, ToFile)
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. |