BindReferences(Vault, DrawingObjVer, LogIdentifier)
Description
Binds any Xrefs in the drawing to make them a permanent part of the drawing and no longer externally referenced files. Binding Xrefs to a drawing is also an easy way to send a drawing to reviewers. Rather than sending a master drawing plus each of the drawings it references, you can use the BindReferenecs method to merge the Xrefs into the master drawing. The DWG file is saved back as the same DWG file version as the original file. For Multi File Document (MFD) objects containing more than one DWG file, only the first file in the collection is processed.
A log file is generated if a LogIdentifier is provided, no log file is created if the LogIdentifier is Nothing. Please see Log Files for more information.
If no DWG files exists in the specified object, then an error is raised.
Syntax
Sub BindReferences(Vault As Vault, DrawingObjVer As ObjVer, LogIdentifier As Object)
Parameters
|
Name |
Data Type |
Description |
|
Vault |
The Vault object provided by the event handler. |
|
|
DrawingObjVer |
ObjVer of object containing a DWG file to process. This could be provided by the event handler or created dynamically using CreateObject("MFilesAPI.ObjVer"). |
|
|
LogIdentifier |
String or TypedValue |
Used to determine the filename of the log file. To create a log file for the current activity pass in the provided ActivityID. If this parameter is Nothing, then no log file is generated. |
Return
No return value.
Example
'create ExcitechDOCS DWG Processor object
Set dwgProcessor = GetExtensionObject("ExcitechDOCS.DWGProcessor")
'bind References
dwgProcessor.BindReferences Vault, ObjVer, ActivityID
The resulting log file would contain the following information:
01/01/2019 09:00:00:0390 - Bind References
01/01/2019 09:00:00:0480 - DWG File Count: 1
01/01/2019 09:00:00:0490 - Creating RealDWG COM Object. (dllhost.exe)
01/01/2019 09:00:00:3300 - Call BindReferences COM method.
01/01/2019 09:00:00:3670 - Processing Object: ID 1 Version 10
01/01/2019 09:00:00:3850 - FileVer: ID 1 Version 4
01/01/2019 09:00:00:3850 - Download DWG to temp file: C:\ProgramData\Excitech Docs\DWG Processor\Temp\kcsolwsg.dwg
01/01/2019 09:00:00:4110 - Open DWG file
01/01/2019 09:00:00:4770 - Repath and Bind References
01/01/2019 09:00:00:6920 - Upload updated DWG file
01/01/2019 09:00:00:7240 - Delete temp files from server
01/01/2019 09:00:00:7250 - Releasing COM object.