Description

Creates a PDF rendition of the DWG file contained within the specified object. The method assumes that only one DWG file and PDF file exists within a Multi File Document (MFD) object. For Multi File Document (MFD) objects containing more than one DWG file, only the first file in the collection is processed. The generated PDF rendition is of the active Layout/Model when the drawing was last saved. Please see Known Issues and Limitations for more details.


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.


WARNING: The specified object must be in a Checked Out state


If no DWG files exists in the specified object, then an error is raised.

Syntax


Sub CreatePDFRendition(Vault As Vault, DrawingObjVer As ObjVer, LogIdentifier As Object)


Parameters


Name

Data Type

Description

Vault


Vault

The Vault object provided by the event handler.

DrawingObjVer


ObjVer

ObjVer of object containing a DWG file to process. This could be provided by the event handler or created dynamically using CreateObject("MFilesAPI.ObjVer"). 

The ObjVer is also the target for the generated PDF file. Single File Document (SFD) objects will automatically be converted to Multi File Document (MFD) objects.


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")


'create PDF Rendition

dwgProcessor.CreatePDFRendition Vault, ObjVer, ActivityID



The resulting log file would contain the following information:


01/01/2019 09:00:00:3701 - Create PDF Rendition

01/01/2019 09:00:00:3761 - DWG File Count: 1

01/01/2019 09:00:00:3771 - Creating ODA COM Object. (dllhost.exe)

01/01/2019 09:00:00:4371 - Call CreatePDFRendition COM method.

01/01/2019 09:00:01:1101 - Processing Object: ID 1 Version 14

01/01/2019 09:00:01:1411 - FileVer: ID 1 Version 5

01/01/2019 09:00:01:1421 - Download DWG to temp file: C:\ProgramData\Excitech Docs\DWG Processor\Temp\31dheqpl.dwg

01/01/2019 09:00:01:1871 - Open DWG file

01/01/2019 09:00:01:5512 - Repath References

01/01/2019 09:00:01:8082 - Plot Settings

----------------------------------------------------------------------------------------------------------------------------------

Plot Layout:               A1

Plot Type:                 Layout

Plot Centered:             False

Paper Rotation:            _90degrees

Paper Origin:              0.00, 0.00

Paper Size:                594.06, 841.04

Paper Units:               Millimeters

Paper Margins:             (Top): 3.17 (Left): 3.17 (Right): 3.17 (Bottom): 3.17

----------------------------------------------------------------------------------------------------------------------------------

01/01/2019 09:00:01:8152 - Exporting PDF

01/01/2019 09:00:02:0032 - Delete temp files from server

01/01/2019 09:00:02:0182 - Convert Object to MFD.

01/01/2019 09:00:02:0532 - Upload generated PDF file

01/01/2019 09:00:02:0532 - Delete temp PDF file from server

01/01/2019 09:00:02:0578 - Releasing COM object.