A recent newsgroup post described a problem getting the Dynamic Grid feature to work with images. The user inserted pictures into their diagram and wanted the same alignment aids that Visio provides for regular shapes. This can be done with a small modification of the image shapes. First let's look at the Dynamic Grid behavior for regular Visio shapes (i.e. shapes with geometry).
The shape on the right is being dragged near the shape on the left. When the Dynamic Grid is turned on (Tools > Snap & Glue dialog), Visio displays both horizontal and vertical alignment lines. The horizontal line indicates that the centers of the shapes are aligned. The vertical line indicates that the shapes will be separated by a standard spacing amount.
If you try the same thing with images, Visio produces different results.
The vertical alignment line is shown, but the horizontal line is not shown. These shapes do not have any visible geometry, which Visio uses as criterion for alignment. When you insert a picture in Visio, the resulting shape has a geometry section but the Line Pattern is set to No Line. It turns out that by making a simple adjustment in the shape, you can make Visio recognize the hidden geometry section and get full Dynamic Grid support. In the Shapesheet (Window > Show Shapesheet), find the LinePattern cell and set it to 1. This makes the shape work with Dynamic Grid. Now to hide the rectangle around the image, find the Geometry section and set Geometry1.NoShow to TRUE. This makes the border invisible once again but does not disrupt the Dynamic Grid behavior.
Here is the feedback when the Dynamic Grid is working with the modified image shapes. Note that the change must be made on the shape your are aligning to (i.e. the shape not being dragged).
Perhaps Visio can make this workaround unnecessary in the future. Meanwhile this is one way to make your images behave just like regular Visio shapes.
Microsoft has significantly updated its Visio product information on the web. Check out the new site at http://www.visiotoolbox.com.
You will find articles, training and downloads that provide a wealth of information on Visio 2007. Those that found the previous IT Toolkit valuable will appreciate the free products and promotional offers on the site. Note that some items require you to register on the site first.
In the previous post we reviewed the problems users were encountering with the CAD Integration feature set in Visio 2003 and the fixes that were made in Visio 2007. In this post we look at the remaining issues with CAD and Visio.
Converting CAD drawings to Visio shapes
Visio 2003 changed the way that CAD drawings are converted to Visio shapes. Instead of converting each entity and adding it as a Visio shape, the entities are converted in bulk to an intermediate document and then the entire document is merged into the current drawing in one big Paste operation. This change makes conversion up to 10 times faster �� a significant improvement. However, Visio now requires quite a bit more memory to accomplish the task. On PCs without sufficient memory, performance degrades because Visio must page memory to disk.
Additionally we have found that some really large CAD files fail to convert. There is a limit to the number of entities that can be converted at once, though this limit is not easily expressed as a quantifiable number. Unfortunately the failure comes near the end of the lengthy operation rather than at the beginning. Visio 2007 does not remedy this situation. Your best bet is to divide up the diagram into more layers and then convert the layers individually. While Visio should handle this situation better, keep in mind that CAD programs are designed to deal with hundreds of thousands of simple entities and Visio is designed to deal with thousands of complex entities. It's difficult to scale up to support the largest CAD drawings out there. Simplifying the drawing before bringing it into Visio is recommended.
DWG file formats supported by Visio
A frequent complaint from users is that Visio refuses to open a DWG file because it was saved in a newer format. Visio 2003 and 2007 do not support the latest file formats used in AutoCAD programs. That means CAD files must be saved back to a compatible version before they can be used with Visio. Visio 2003 and 2007 support the R15 version of the DWG format. This was the default format used by AutoCAD 2000 and AutoCAD 2002. Newer versions of AutoCAD save to newer versions of the DWG format by default.
Additionally, Visio does not support all the entities defined in the R15 version of the DWG format. In terms of entity support, Visio handles the entities defined in the R14 version of the DWG format with a few exceptions. A specific entity list is beyond the scope of this blog post. The point is that the level of entity support and the version of the file format supported are not identical.
Note that there was a specific problem where files saved out from AutoCAD 2007 would not open in Visio 2007 even when saved back to the R15 format. This was corrected in Visio 2007 SP1.
What's next for CAD integration
It's too soon to announce our plans for the next release. We continue to gather information from customers about their needs for CAD with Visio. Your input on specific issues or the overall importance of CAD integration to your Visio usage is encouraged.
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.
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.