Design-Drawing Home  
Drawing Program
ISSN 1441-5585

Search...

Home
Articles
Software Catalog
Book Store
About
Advertising
Newsletter

 

 

Translating Visio Drawings into Actrix 

Ralph Grabowski

In the absence of a common data format and the diversity of technical drawing programs available, technical professionals place great store by the ability of their applications to transfer data reliably. If there are problems, there inevitably will be, it's better to know in advance where they will occur.  In this series of articles we examine the exchange of data between Visio and Actrix. 

In a previous article, I recorded my initial experiences in importing a Visio drawing into Actrix Technical 2000. I found that (1) Visio must be installed on the same computer as Actrix; and (2) Actrix fails to open the Visio document when Visio is running at the same time. This lead to one reader asking, "Why would you use Actrix if you have to have Visio installed?"

I then spent a day tracking down documentation on translating Visio drawings, finding bits and pieces scattered in a Readme.Wri file, VisioDrawingConversionLog.txt log file, and several help files, including the undocumented SmartShapes Conversion Wizard. My initial research found that: 

  • Actrix reads Visio 5.x and 2000 files, but does not translate back to Visio format. 
  • Actrix does not translate ShapeSheet sections and cells new to Visio 2000. 
  • Actrix runs Visio in the background to perform the conversion.

Translation Efficiency
When Visio Technical first attained its ability to translate AutoCAD drawings, the process was painfully slow -- typically taking an hour! With this in mind, I translated ten Visio sample drawings into Actrix. I timed each and recorded the file sizes. The table below shows the result:

Visio Drawing Name  Number of Pages/Objects  VSD Filesize  AXD Filesize  Time to open in Visio  Time to translate by Actrix  Time to open in Actrix
Organizational Design Block Diagram  2 / 16  75KB Failed to open -- -- --
Block Diagram 1 / 97 113KB 458KB  0:03  1:21  0:06
Vertical Cross-functional Flowchart  1 / 23 67KB 73KB  0:05 0:32 0:02
Dataflow Diagram  2 / 26 309KB 498KB 0:03 1:11 0:03
Basic Wide Area Network  2 / 44 252KB  437KB  0:03 1:16 0:05
Office Layout   /  706KB  Failed to open -- -- --
Calendar  1 / 12 123KB  167KB  0:03 0:37 0:03
Gantt Chart  2 / 131 162KB  Failed to open(*) -- -- --
Sample Database Network Layout  1 / 47 462KB  Failed to open  -- -- --
Sample Database Airplane Seating  1 / 289 109KB  1,582KB 0:03 3:44 0:21

    (*) Displays Visio's 'Gantt Chart Options' dialog box.

Visio Drawing Name:  filename of the Visio drawing names, found in the \Visio\Samples folder.
Number of Pages/Objects:  the number of pages, and the total number of shapes (objects) in the Visio file. 
VSD Filesize:  size of the drawing in Visio's VSD file format. 
AXD Filesize:  size of the translated drawing in Actrix's AXD file format. 
Time to open in Visio:  the time, in min:sec, to open the VSD file in Visio 2000. 
Time to translate by Actrix:  the time, in min:sec, to translate the VSD file in Actrix. 
Time to open in Actrix:  the time, in min:sec, to open the resulting AXD file in Actrix.

The result of my study shows the following points: 

  • Actrix failed to open 4 out of the ten drawings. Actrix gives no clue as to the reason for the failure, and I was not able to find a pattern that would explain the failure. 
  • The translated AXD file is always larger than the original VSD file. This is normal when a drawing is translated from one file format to another. There is no pattern, however, between the size of VSD and AXD files; the translated size can be 10% larger or 15x larger. 
  • The time to translate a VSD file is always slower than opening a native file. Again, this is normal, especially considering that Actrix loads Visio each time. The larger the resulting AXD file, the longer translation takes. 
  • After being translated, Actrix is as quick as opening the drawing as Visio.

Translation Quality 
When it comes to examining the quality of the drawing translation, there are two levels of quality:

Level 1: Does the translated drawing look substantially the same as the original? This is sometimes known as Print-level accuracy
Level 2: Does the translated drawing retain vital information? This is known as database-level accuracy.

To test Level 1, I printed out the six drawings Actrix was able to translate, once each for Visio and Actrix, then I compared the two printouts. In general, the print-level accuracy was good, but not perfect. I was concerned that shapes, connections, and text be located and represented accurately; I was less concerned that secondary attributes -- such as color, shading, and font -- be accurate.

Shapes: I found four shapes errors. 

  • Actrix did not shade the shaded (occupied) seats in the Airplane drawing. 
  • Actrix misdrew a double-line rectangle in the Calendar drawing. 
  • The drawing border in the Vertical flowchart extended too far to the right in Actrix. 
  • Actrix failed to draw the three maps in the Wide Area Network drawing; the map of continental America was replaced by a boxed X.

Connectors: I found five connection errors. 

  • Actrix drew a pair of arrowheads in the Vertical flowchart different and smaller than in the original. 
  • Two connectors in the Wide Area Network drawing were drawn flipped-vertically. 
  • In the Dataflow drawing, Actrix drew most (not all) arrowheads larger; two connectors were drawn out of position by a quarter-inch. 
  • Actrix drew some connectors were drawn with a lighter lineweight than found in the Visio drawing.

Text: In general, Actrix was able to mimic the text accurately, including font, size, and placement. I found, however, three errors. 

  • The most serious error was in the Calendar drawing, where all day name and date numbers ended up squashed together in the upper-left corner (see figure 1)
  • Actrix ignores the tab setting in the summary table of the Airplane drawing. 
  • Actrix gave the Yes and No words in the Vertical flowchart a blue background, rather than white.

The original Visio calendar drawing

The Visio calendar as it appears translated by Actrix

The original Visio drawing (top), and the same drawing translated by Actrix (bottom). Notice how Actrix moved the day text to the left, and that the date numbers are missing

Miscellaneous: Actrix imports Visio background pages, but treats them as a separate page; this means that Actrix prints the background on a second sheet, rather than combining the background with the foreground on a single sheet -- as does Visio. Actrix does not replicate the gradient shading found in some Visio drawings.

To test Level 2 comprehensively means checking the outcome of literally nearly 250 ShapeSheet cells, something I am not going to undertake. A useful reference, though, is the help file \Actrix\Help\VisViz.Help, which describes in detail which Visio sections and cells Actrix converts. The help file does not state that many sections are not converted. The help file includes tables that show how cells are translated from Visio to Actrix.

How Actrix Translates Visio Drawings 
I don't have the full details on how Actrix uses Visio to perform its translation -- I've asked and Autodesk won't tell -- but from clues I've been able to glean it appears that Actrix launches Visio as an OLE server. I am guessing that Actrix instructs Visio to open the drawing to be translated, then uses Automation to read and translate the ShapeSheet data.

If you are interested in the details, read Visio's Developing Visio Solutions document (available as a PDF file), starting with the chapter entitled "Writing Code to Extract Data from a Visio Drawing" (page 386 in my copy). The chapter even includes two pages of sample VBA code for extracting shape data from a drawing. For example, Visio's pagObj.Shapes function defines the collection of all shapes on the active page.

My guess is that Autodesk simply took this example code (as it is permitted to do), and modified it to translate every Visio shape into an Actrix equivalent. In my opinion, this is a semi-brilliant solution to the problem. On the one hand, it gets around the tedious (and possibly illegal) activity of reverse-engineering the VSD and VSS file formats. On the other hand, it requires that Visio be installed, and suffers from the instability issues created by Microsoft's Automation technology. When it fails (as Automation too often does), it can lock up the applications involved (Visio and Actrix), and consumes system resources, such as memory, to the point where a reboot is required.

Going the other direction, from Actrix to Visio, is not as easy. You have to take an indirect route:

Step 1: Save the Actrix drawing in DXF format. Use the File>Save As command. 
Step 2: Open the DXF drawing in Visio.

The result, however, is not pretty. In translating the drawing to DXF format, Actrix loses even more information (see figure 2).

The drawing exported from Actrix to Visio via DXF format
The drawing exported from Actrix to Visio via DXF format

Ralph Grabowski

Previous articles on the same subject...

 

 
  Rate this article...
Hmm  OK  Good  Yes! Brilliant
Your a friend about this article.

Copyright © 1998-2007 DBM & others | Disclaimer | Privacy | Re-publication | Trademarks | Webmaster | Home