CAD Integration in Visio – Part 1


Visio has long had the ability to display, import and export CAD drawings stored in the DWG and DXF file formats.  If you are unfamiliar with the ways that Visio can work with CAD drawings, please read through this previous post.

In Visio 2003 the CAD feature set was overhauled to improve performance and reliability plus provide a better mapping of Visio shapes to CAD entities on Export.  There were changes in the CAD Display Properties and Conversion dialogs as well.  Unfortunately there were a number of serious bugs that impacted the functionality of the feature set.  A few items have been fixed in Visio 2003 service packs, but many more were addressed in Visio 2007.

This post describes the problems in Visio 2003 that were corrected in Visio 2007.  The next post will discuss the remaining issues surrounding Visio's CAD integration.

Insert CAD Drawing

There are two ways to display a CAD drawing in a Visio document.  If you go to File > Open, you can point directly at the DWG or DXF file and open it.  Visio creates a new blank drawing, chooses a page scale that will fit the CAD drawing to the Visio page and adds the CAD drawing.  Another method is to start from an existing diagram and go to Insert > CAD Drawing.  Visio shows the CAD Drawing Properties dialog and allows you to specify the scale you want to use.  Unfortunately, there are several issues going this route in Visio 2003:


 

 

·         Visio defaults to a custom scale that fits the CAD object to the page, but this scale does not match the scale of the Visio page.  If you choose this default, the CAD object will be scaled incorrectly with respect to everything else in the diagram.  When inserting into an existing diagram you should always choose the current page scale.  The custom scale default is really only useful when you want to use the CAD drawing as an unscaled image in your diagram.

·         Since CAD drawings don't explicitly define what units of measure are used, you must specify the CAD drawing units in the dialog to properly scale the CAD object.  This can be confusing, and in Visio 2003 the setting doesn't work.  The value is ignored, resulting in improper scaling for CAD objects drawn in Metric coordinates.

·         For those who bravely tried to get the scale settings configured properly, there is one more problem:  The preview pane did not update as you made changes to the settings.  Thus the visual feedback about what you would get was also wrong.

These issues combined to make Insert > CAD Drawing very challenging in Visio 2003.  Settings either didn't work or were configured improperly by default.   This created unnecessary confusion and frustration for customers.  Visio 2007 corrects these problems, although it is still the responsibility of the user to set the CAD drawing units properly to end up with the right scale.

A note of caution for Visio 2007:  The CAD Drawing Properties dialog does not remember settings very well.  Once you close the dialog and reopen it, you will have to reset the Pre-defined scale to Page Scale again.  Also do not manually resize the CAD object using the green shape handles since this just distorts the scale.

Export CAD Drawing

Visio drawings are exported to CAD files using the File > Save As > DWG / DXF command.  If there is no existing CAD object in the drawing, Visio converts the Visio shapes to entities correctly.  If there is a CAD object in the drawing, Visio 2003 fails to use the proper scale to ensure that the converted Visio shapes match up with the existing CAD object's entities.  It also fails to position the converted shapes relative to the existing CAD entities.  Additionally any cropping or rotation of the CAD object is ignored in the exported file.

Visio 2007 corrects most of the scaling and positioning issues.  There are a few cases with dimensions that still are troublesome.  Visio 2007 does not support cropping or CAD object rotation on export.

Customer Input

Many of the fixes in Visio 2007 can be credited to a group of customers that are passionate about Visio and its use with CAD drawings.  At the Visio Conference in 2006 the product team showcased the upcoming Visio 2007 version with its emphasis on data connectivity.  However, a number of partners and customers voiced concerns about the problems with CAD in Visio 2003.  In an ad-hoc meeting, we sat down with all interested parties to understand the issues and hear firsthand how important the feature is for these customers.

Following the conference, the Visio team did an extensive review of the CAD feature set to uncover the bugs that were causing the most customer pain.  These issues were corrected in Visio 2007 and released as part of the Visio 2007 betas to have partners and customers verify the fixes.  The result is a significantly better experience in Visio 2007 over Visio 2003.  We weren't able to address all concerns though.  Next time we will look at the current state of CAD integration in Visio.