Convert CAD / DWG to PDF using Power Automate

Muhimbi PDF Converter version 8.3 and above, supports the conversion of CAD files to PDF. The key features of the CAD Conversion are as follows:

  1. Full 2D and 3D support.
  2. Highly configurable (Output paper size, margins, Layouts / Views to convert)
  3. Automatic and intelligent recoloring of drawings, e.g. Switch background to black, white or any other color without losing visibility of elements that were already using that color. Full Black and White support is available as well.
  4. Conversion of individual Layouts or all Layouts while skipping empty and invalid ones.
  5. Automatic detection of paper orientation.

As the converter is part of our highly scalable PDF Converter Services, it automatically benefits from all its features including reliability, scalability, watermarking engine, cross platform support, web services based API, PDF security, SharePoint integration, Nintex Workflow integration, Java support, InfoPath attachments, Windows Azure etc.

Listed below are three different images of the same drawing after conversion to PDF, but with different recoloring options.

CAD Sample - White Back

CAD Sample - Black Back

CAD Sample - Black and White

You can also use third party CAD converters in combination with the Muhimbi PDF Converter.

Using PowerAutomate to Convert CAD Files to PDF

This example takes you through converting CAD files to PDF.

Before we begin, please make sure the following prerequisites are in place

  • Power Automate subscription.
  • Install and Configure Gateway for Power Automate.
  • Muhimbi PDF Converter for Power Automate, full or free trial subscription.
  • Appropriate privileges to create Power Automate Flows.
  • Working knowledge of Power Automate.

1: Create a flow

Create a flow and find the “When a file is created or modified (properties only)” trigger. Using this trigger will allow you to start the flow when adding or modifying a property of a file into a folder.

In the action, specify the path to the SharePoint Online Library to monitor for new items

create a flow

2: Get file content

Add the SharePoint “Get file content” action to the Power Automate Canvas and configure it with reference to the details below:

Site Address: Specify the path to the SharePoint Online site collection which holds the file. File Identifies: “Identifier” the output from the “When a file is created or modified (properties only)” action.

get file content

Step 3: Convert CAD drawing to PDF

Add the Muhimbi “Convert CAD drawing to PDF” action to the Power Automate and configure it with reference to the details below. If your source documents are already in PDF format then this step is naturally not needed.

Source File name: “File name with extension” the output from the “When a file is created or modified (properties only)” action. Source file content: “File Content” the output of the “Get file content” action.

Leave the other options as default but you may want to change the advanced option with reference to details below.

convert cad drawing to pdf

Name

Key

Description

Source file name

source_file_name

Name of the source file including extension

Source file content

source_file_content

Content of the file to convert

Paper size

paper_size

Paper size for the output

Paper size (custom)

paper_size_custom

Applicable if 'Paper size' is set to 'Custom'

Page margins

page_margins

E.g. '1.5cm' (for uniform) or '0.5in, 0.25in, 0.5in, 0.25in' (for non-uniform) margins

Background color

background_color

.Net color name or hex color (#aarrggbb or #rrggbb)

Foreground color

foreground_color

The foreground effect or color

Foreground color (custom)

foreground_color_custom

.Net color name or hex color (#aarrggbb or #rrggbb). Applicable if 'Foreground color' is set to 'Custom'

Empty layout detection

empty_layout_detection_mode

Select which layouts should be skipped

Layout Sort Order

layout_sort_order

Specify the sort order in which the layouts are converted

Start page

start_page

The first page to include

End page

end_page

The last page to include

Override settings

override_settings

Optional settings using Muhimbi's XML syntax

Fail on error

fail_on_error

Fail on error

Step 4: Create a file

Add the ‘Create file’ SharePoint action to store the PDF document in the File Explorer action library.

Note: You will need to configure a gateway to write files to your filesystem, as mentioned in the prerequisites section.

File name: Base file name.pdf (output variable of the Convert CAD drawing to PDF )action. File content: Processed file content the (output variable of the Convert CAD drawing to PDF)action.

publish workflow

That is it. Publish your Flow and upload a file (e.g. an CAD drawing) to the folder that is monitored by the configured SharePoint trigger. After a short wait, you can find the PDF document in the destination document library\folder in your SharePoint.

Have a Question?
We’re Always Happy to Help.

© Muhimbi Ltd. 2008 - 2023
This website uses cookies to ensure you get the best experience. Learn more