Design-Drawing Home  
Drawing Program
ISSN 1441-5585

Search...

Home
Articles
Software Catalog
Book Store
About
Advertising
Newsletter

 

 

CGM file generated by SmartSketch viewed in a web browser
Viewing CGM in a Web Browser

Ralph Grabowski


There are several ways to display CAD drawings on the Web. You can use native formats, like AutoCAD DWG, MicroStation DGN, and so on, or you can use a format especially adapted for the Web, like ActiveCGM, DWF (Autodesk’s drawing Web format), and SVF (SoftSource’s simple vector format).

The latter formats are designed for the Web since: 

  • they are many times more compact than the original CAD drawing; and 
  • they are not the original drawing, which cannot be tampered with

SmartSketch allows you to save as ActiveCGM format. As well as providing a compact Web-friendly format, ActiveCGM supports zooming, panning and other image control features useful in viewing technical images.

A History of ActiveCGM

InterCAP Graphics Systems, Inc. (owned at the time by Intergraph) adapted the well-known CGM format for the Internet, calling it ActiveCGM. CGM is short for "computer graphics metafile" and supports both vector and raster data in a single file. CGM has been around for many years, and forms the basis of several other well-known formats: WordPerfect’s WPG (WordPerfect graphics), Microsoft’s WMF (Windows meta format), and Microsoft’s EMF (enhanced meta format).

InterCAP defines CGM technically this way: "CGM supports the definition of graphic objects bound to non-graphic attributes. The CGM file format is defined by ANSI/ISO 8632-1992 (American National Standards Institute/International Standards Organization) and MIL-STD-2301 (Military Standard). CGM is the international standard that defines a hybrid (raster, vector, and text) graphics format. Definition of graphical objects is supported at any arbitrary level of abstraction through a tagging mechanism similar to SGML and HTML."

InterCAP (CAP being an acronym of Computer Aided Publishing) developed ActiveCGM as a way of displaying CAD and other technical drawings on the Internet. ActiveCGM is meant for 2D drawings. It allows hyperlinking of vector and raster graphics, and supports zooming, panning, hotspots, hyperlinks, and database links.

InterCAP Graphics Systems. Inc. was acquired by Micrografx in April 1999 and has continued to develop ActiveCGM and added to the acceleration of Micrografx's web strategy.

ActiveCGM Plugins

When you install SmartSketch, the setup program gives you the option of also installing ActiveCGM plugins for Netscape Navigator and Internet Explorer. If your Web browser cannot display the ActiveCGM file, run the Setup program on the SmartSketch CD-ROM to install the plugins. You can also download the plugin from the InterCAP web site.

You can use SmartSketch to generate ActiveCGM files from drawings generated by other CAD packages, since SmartSketch can read DXF, AutoCAD DWG, and MicroStation DGN files.

Creating an ActiveCGM File

SmartSketch provides two ways to create an ActiveCGM file:

  • As a stand-alone CGM file.
  • Embedded in an HTML file.

The steps for creating either are very similar, as follows:

1. Start SmartSketch, and open a drawing.

2. From the menu bar, select File:

  • To save the drawing as a stand-alone CGM file, select Save As. In the Save as Type list box, select CGM Metafile (*.cgm). Click Save.
  • To save the drawing as a CGM file embedded in an HTML document, select Save as Web Page(s). In the dialog box, select either All Sheets or Active Sheet, and click Next. Give the HTML page a filename and click Save.

3. Switch to your Web browser, and drag either of the saved files (*.CGM or *.HTM) from the File Explorer into the browser.

4. Right-click the drawing to see the shortcut menu. Most of the commands are related to viewing the image: zooming and panning. Other commands include:

Magnify: Displays a window with a magnified view of the drawing.

Redline: Allows you to markup the drawing with red lines (hence the term), text and callouts for notational purposes.

Copy to Clipboard: Copies the entire drawing or a rectangular portion to the Clipboard. Curiously, the drawing is copied in bitmap format, and not in WMF format.

Print: Prints the drawing to the system printer. Careful: this is WYSIWYG (what you see is what you get) printing; if the drawing is zoomed in, that is what gets printed.

Save: Saves the drawing in CGM format.

5. When a multi-page drawing has been exported, SmartSketch automatically creates page tabs so that you can move between them.

Posting Your Work on the Web

The key value in creating ActiveCGM files is that you can easily make high quality images available on the Web. A major advantage of of using SmartSketch is that it can create both the CGM file of your drawing and the webpages to display it for you. This eliminates the somewhat technical procedure of coding your HTML pages to correctly display the CGM images. A significant time and energy saving since ActiveCGM is not (yet) an inherent format part of the HTML specification and requires the use of special HTML tags in defining the web page.

You may also need to configure your web server to send the CGM file type and every browser accessing the pages will need to use of ActiveCGM add-in browser software.

Demonstration
Lets look at an online ActiveCGM demonstration. To see the demonstration pages you must have ActiveCGM software installed for your browser. An ActiveX control is available for Internet Explorer and a plug-in for Netscape on the SmartSketch installation CAD of directly from the InterCAP website..

Download your free ActiveCGM browser software

View Cranehook Example

Webpage Creation
To include ActiveCGM in your pages like those in the demonstration pages, you need to employ special HTML tags. Adding to the complexity, different browsers (i.e. Netscape and Internet Explorer) require different tags. For a full discussion on tags visit the InterCAP site. For a practical example of page construction download the sample pages used in the demo above. The download zip file includes all the HTML and CGM files used.

Download sample files archive

Server MIME type configuration
Your web server may need to be configured to recognise CGM files and send them as binary data. The procedure for setting up MIME maps differs with each server. Unless you maintain your own server it will just be a matter of asking your server administrator to do this for you. More information on MIME type mapping is available on the InterCAP site. Search on MIME.

Ralph Grabowski

 
  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