Skip to content

Create AutoCAD Pdf

The Create AutoCAD Pdf node is used to generate PDF files from AutoCAD drawing files (.dwg) using pre-configured or dynamically selected plot settings. This task leverages Autodesk TrueView in the background to execute the publish operation and outputs one or more PDF files.

Purpose

To automate the conversion of DWG files into PDF format using specified plot settings. This is particularly useful in drawing release workflows, document control, and CAD output standardization.


Inputs

LabelTypeDescription
Local File Full PathtextThe full local file path of the DWG drawing to be converted to PDF.
Advanced Plot Settingsobject(Optional) JSON object defining advanced control logic and plot settings.

Output

NameDescription
PublishedFilesA list of generated PDF file paths.

These are returned as part of the task’s data dictionary under the key PublishedFiles.


Behavior

  1. File Validation: The task checks if the provided DWG file path exists. If the file is missing, the task fails.

  2. Default Plot Settings: If no advanced settings are provided, a set of default options are used:

    • Sheet Size: Layouts
    • What to Plot: Model and Paper
    • PDF File: Single Pdf
  3. Advanced Settings (Optional):

    • If Advanced Plot Settings is provided, it attempts to deserialize the object and extract:

      • A Control Property (used to match against rows in the settings).
      • A matching row of settings from rows based on the control property.
      • The control property value may include placeholders, which will be replaced using the task data dictionary.
    • If the control property and matching row are found, those settings override the defaults.

  4. PDF Generation: Uses the PublishWithTVCore method (from the TrueView integration) to generate the PDF(s).

  5. Cleanup: Removes Local File Full Path from the task data upon success.


Success Criteria

  • PDF files are successfully created and their paths returned in the PublishedFiles output.
  • taskSuccess = true, taskMessage = "Pdf Created", statusReturn = "Completed"

Failure Modes

ConditionMessage
Missing DWG fileLocal File not found
Invalid or unreadable advanced settings JSONUnable to understand advanced plot settings
PDF generation failsFailed to Publish
Exception occursUnhandled Error: <error>

Notes

  • The task uses Autodesk TrueView in the backend (MinuteView.Publisher.TrueView.Publisher) to perform publishing.
  • Advanced settings must conform to the expected structure defined in the AdvancedSettings class, with controls and rows.

Example Use Case

Scenario: You have a CAD drawing C:\Drawings\Project1\layout.dwg and want to automate its publishing to a PDF using custom plot configurations that vary by sheet size.

  1. Add a Create AutoCAD Pdf node.
  2. Provide the full path: C:\Drawings\Project1\layout.dwg
  3. Optionally pass in Advanced Plot Settings with control logic keyed by sheet size.
  4. Retrieve the PublishedFiles output and use it in subsequent nodes (e.g., upload to SharePoint or email).

Tags

cad, autocad, pdf, trueview, dwg, publish, plot, document-control


Tentech 2024